power: pm8921-bms: fix the pc calculation algorithm
The current algorithm compares if an ocv is between two temperature
columns of the same row. This is not valid since the data in one
temperature column is collected independently of the data in another
temperature column.
It is incorrect to assume a relation between ocv values for the same
percent row for different temeperature columns.
Fix it by finding a percent charge for a bounding temperatures and
then interpolating these percent charges based on battery temperature.
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
1 file changed