summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Gong <b38343@freescale.com>2013-03-25 14:27:42 +0800
committerRobin Gong <b38343@freescale.com>2013-03-27 15:00:22 +0800
commit08c9214073ca584a41641456b54a1167815d2970 (patch)
tree42b06301109a2e8ab02b45bae6370a42aeff156e
parentf102734e479c26dbaa9fdaa15db945d00c55dd63 (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>
-rwxr-xr-xdrivers/power/sabresd_battery.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/power/sabresd_battery.c b/drivers/power/sabresd_battery.c
index 648922139790..b84f0d4ad7a4 100755
--- a/drivers/power/sabresd_battery.c
+++ b/drivers/power/sabresd_battery.c
@@ -2,7 +2,7 @@
* sabresd_battery.c - Maxim 8903 USB/Adapter Charger Driver
*
* Copyright (C) 2011 Samsung Electronics
- * Copyright (C) 2011-2012 Freescale Semiconductor, Inc.
+ * Copyright (C) 2011-2013 Freescale Semiconductor, Inc.
* Based on max8903_charger.c
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -300,12 +300,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) {
data->voltage_uV = temp;