power: pm8921-bms: limit voltage correction

The "adjust_soc" algorithm where we change the open circuit voltage
(ocv) in steps so that the state of charge (soc) starts approaching
the estimated soc, causes nonlinearity in the soc curves if an incorrect
resistance value is fed to the algorithm.

As battery ages and temperature changes, it is hard to estimate the
exact battery resistance.

So to fix the nonlinearity, limit the amount by which the ocv is
changed. Make it proportional to the current, i.e. change ocv by
small amounts in light load and let it change by proportionally
large amounts in heavy load situations.

Also, make the point where the soc is adjusted configurable via platform
data instead of forcing it to 25%.

Change-Id: Idc141e6bf3172dab278afe1900f5a1f9cdd624dd
Signed-off-by: Abhijeet Dharmapurikar <adharmap@codeaurora.org>
This commit is contained in:
Abhijeet Dharmapurikar
2012-08-01 21:33:09 -07:00
committed by Stephen Boyd
parent 29a6bcf6e4
commit fbb8dc031a
5 changed files with 27 additions and 1 deletions

View File

@@ -132,6 +132,7 @@ struct pm8921_bms_platform_data {
int enable_fcc_learning;
int shutdown_soc_valid_limit;
int ignore_shutdown_soc;
int adjust_soc_low_threshold;
};
#if defined(CONFIG_PM8921_BMS) || defined(CONFIG_PM8921_BMS_MODULE)