power: pm8921-bms: handle restarts without pmic power on
There are situations when the system undergoes a restart but the
pmic does not execute its power on sequence. In such cases the
OCV value is not updated and the CC value is not cleared - they
carry values from the previous boot.
In such cases reset the CC value and measure the OCV. One can easily
detect the non power on case by checking the CC value. If it is above
5mAh, trigger this workaround. One can also use the power on module
register status to check if the pmic was restarted with a warm reset.
On similar lines we have seen issues when a very low OCV is recorded.
(5mV). This could be because the battery is not secure in the terminal
or a missing battery etc. Apply the same workaround for such cases.
Change-Id: I827bd74e9892969bb4891b31af1515789fa76c1c
Signed-off-by:
Abhijeet Dharmapurikar <adharmap@codeaurora.org>
Loading
Please register or sign in to comment