power: pm8921-bms: calculate ocv if not available at init
On older pmic versions an ocv (open circuit voltage) may not be
taken at power on time. However the coulomb counter values will
be incremented.
The state of charge calibration is calculated based on ocv and
coulomb counter, so it is essential to get an ocv reading very
early.
If an ocv reading is not available at probe time, calculate it based
on adc readings and the current flow.
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
1 file changed