summaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorRobin Gong <b38343@freescale.com>2013-03-25 14:27:42 +0800
committerRobin Gong <b38343@freescale.com>2013-06-17 15:38:11 +0800
commit99a10ef4dfa596f4d13bad680bc705548e672dc4 (patch)
treeed81486c5c756e79197bffcbb632759e552d0442 /drivers
parent51840fab980ec47d142b22006cb50e20b9740a05 (diff)
ENGR00255111 battery: fix voltage decreased only while discharging
If system run higher cpu loading with bigger current, such as GPU or VPU, the voltage of battery will decrease down quickly and rise up later.But the battery driver only permit voltage decreasing while discharging before, in other words, in the above case , the voltage will keep in very low level, although the voltage will rise back again. Now, remove the constrain in the code. Of course, with the patch, voltage will down and rise back when run high loading user case, but it's better than LOW ALWAYS, in worst case, the battery capacity will be 0 as test team reported Please note : Current battery capaity is not accurate because of hardware design defect(ENGR00219632) on Sabresd.So please ignore the accuracy issue. Signed-off-by: Robin Gong <b38343@freescale.com>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/power/sabresd_battery.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/power/sabresd_battery.c b/drivers/power/sabresd_battery.c
index ad6d178fc28f..42f1cc43994f 100644
--- a/drivers/power/sabresd_battery.c
+++ b/drivers/power/sabresd_battery.c
@@ -326,12 +326,8 @@ static void max8903_battery_update_status(struct max8903_data *data)
temp_last = temp;
}
if (data->charger_online == 0 && temp_last != 0) {
- if (temp < temp_last) {
- temp_last = temp;
- data->voltage_uV = temp;
- } else {
- data->voltage_uV = temp_last;
- }
+ temp_last = temp;
+ data->voltage_uV = temp;
}
if (data->charger_online == 1
|| data->usb_charger_online == 1) {