power: qpnp-bms: restrict soc decrease to one percent
The calculated soc could decrease up to 3% within one
calculation period. This will happen when UUC and CC increase
by 1% percent while the adjusting algorithm reduces the OCV
to cause RC to decrease by 1%.
Update the reporting side of the code to restrict the decrease
of soc by 1%. There will be ample time to catch up to calculated
soc.
Importantly, when the device is resumed after a long time, we don't
want to restrict the soc decrease. So when the device resumes and
the BMS sleeps for longer than the SoC calculation period, unrestrict
the next soc.
Change-Id: I8dda42735df3608b42ab94f42f22a892ee61df20
Signed-off-by: Xiaozhe Shi <xiaozhes@codeaurora.org>
1 file changed