From d3c39e5541eb5a0ee41ea66b355b65dfe4c4c93c Mon Sep 17 00:00:00 2001 From: "choongryeol.lee" Date: Wed, 15 Aug 2012 00:36:39 -0700 Subject: [PATCH] mako: power: pm8921-bms: use shutdown soc if it is within limits When a strong battery is removed, it was seen that the battery voltage lines on the phone take about five to six seconds to go below 2.1volts where the pmic resets all the battery backed registers. If a new battery is plugged in within this time the driver will force the shutdown soc on this battery which is incorrect. Compare the shutdown soc with the calculated soc and if they are different than a configurable limit, simply discard the shutdown soc and use the calculated soc. Change-Id: Ic1ce32c78346e7310b54087b03b2ee24ad6715b7 --- arch/arm/mach-msm/lge/mako/board-mako-pmic.c | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/mach-msm/lge/mako/board-mako-pmic.c b/arch/arm/mach-msm/lge/mako/board-mako-pmic.c index 799342ae237..ce8a6a8cd99 100644 --- a/arch/arm/mach-msm/lge/mako/board-mako-pmic.c +++ b/arch/arm/mach-msm/lge/mako/board-mako-pmic.c @@ -386,6 +386,7 @@ apq8064_pm8921_bms_pdata __devinitdata = { .r_sense = 10, .v_cutoff = 3400, .max_voltage_uv = MAX_VOLTAGE_MV * 1000, + .shutdown_soc_valid_limit = 20, }; /* battery data */