battery : Avoid changing Battery health if its already DEAD.
authorsantosh <santoshx.gugwad@intel.com>
Wed, 4 Jan 2012 06:43:57 +0000 (12:13 +0530)
committerbuildbot <buildbot@intel.com>
Thu, 5 Jan 2012 05:46:49 +0000 (21:46 -0800)
BZ: 15259

With this patch the battery health is changed to GOOD only after checking
If presently it is not DEAD.

Change-Id: I1f36573f571bbdcefff35fdadc6ae3da0a0be0c9
[Rebased to R3]Change---Id: I5d6d762d4ef28b07f06585ae98f36f639e21f6e8
Signed-off-by: yashodhan kurtadkar <yashodhan.kurtadkar@intel.com>
Signed-off-by: santosh <santoshx.gugwad@intel.com>
Reviewed-on: http://android.intel.com:8080/30384
Reviewed-by: buildbot <buildbot@intel.com>
Tested-by: buildbot <buildbot@intel.com>
drivers/power/intel_mdf_battery.c

index a657c13..03f7423 100644 (file)
@@ -1790,6 +1790,7 @@ static void update_battery_health(struct msic_power_module_info *mbi)
                /* check for battery overvoltage,overheat and dead  health*/
                if ((mbi->batt_props.health !=
                                      POWER_SUPPLY_HEALTH_UNSPEC_FAILURE) &&
+                       (mbi->batt_props.health != POWER_SUPPLY_HEALTH_DEAD) &&
                        (temp <= (batt_thrshlds->temp_high -
                                 MSIC_TEMP_HYST_ERR)) &&
                        (temp >= (batt_thrshlds->temp_low