power: pm8921-bms: change OCV when scaling soc for charging
A drop in state of charge (soc) was observed right after End Of Charge
(EOC) happens. This was because calculated soc was still low, while the
scaling algorithm increased the SOC to 100%. There was a situation
where SOC was calculated right when charging finished but charger did not
send the EOC to bms - the charging adjustments algorithm does not scale
since it sees charging is stopped and falls back to the calculated soc
which was lower than the scaled soc.
Fix this by changing the calculated OCV(open circuit voltage) of the
battery so that the calculated soc is same as the scaled soc.
Change-Id: Ieb409721da6fc70d673ccbf4334f94a1793dfe7e
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
1 file changed