power: qpnp-fg: improve capacity learning algorithm
Currently, when the battery missing event happens, capacity
learning algorithm doesn't handle that scenario. This can cause
unexpected processing and storing of learned capacity. Skip this
by checking battery missing condition at every step of capacity
learning algorithm.
In addition, if a bad capacity was stored before, detect that by
validating against nominal capacity which comes from the battery
profile. If the learned capacity deviates from nominal capacity
by a certain percentage (e.g. 50%), then use the nominal capacity
instead of the learned capacity.
CRs-Fixed: 977878
Change-Id: I8f47fdf5da216789f6b6f0fccf2fb66ceb618b9b
Signed-off-by:
Subbaraman Narayanamurthy <subbaram@codeaurora.org>
Loading
Please register or sign in to comment