Commit b7092f17 authored by Abhijeet Dharmapurikar's avatar Abhijeet Dharmapurikar
Browse files

power: pm8921-bms: calibrate ocv only when it changes



The current driver adjusts the ocv (open circuit voltage) every time
it is asked to do a state of charge calculation. This results in small
errors in state of charge as the calibration values changes.

Update the driver such that it converts a raw ocv value to voltage only
when it changes. For other times it uses the previously calculated ocv
voltage (stored in last_ocv_uv). This implies that calibration data used
for raw to voltage conversion is right around when ocv was taken.

Change-Id: I27832682f77391c4fce65127e25ec456ee1a0fd1
Signed-off-by: default avatarAbhijeet Dharmapurikar <adharmap@codeaurora.org>
parent fe36d236
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment