summaryrefslogtreecommitdiffstats
path: root/drivers/power
diff options
context:
space:
mode:
authorHakan Berg <hakan.berg@stericsson.com>2012-07-23 14:00:50 +0200
committerLee Jones <lee.jones@linaro.org>2013-03-07 12:35:44 +0800
commit642776182c2412739f433d84da0ab8872a0509a8 (patch)
tree51c378680815fbc204c8af7774d6673a8cb80002 /drivers/power
parent908fe8d6a575e2bdf349ba8635b862eeb91f7ade (diff)
downloadlinux-642776182c2412739f433d84da0ab8872a0509a8.tar.bz2
ab8500-fg: Allow capacity to raise from 1% when charging
When battery capacity was going below 1% fg is not supposed to report 0% unless we've got the LOW_BAT IRQ, no matter what the FG-algorithm says. This made fg get stuck at 1% if charger is connected when capacity is 1%. Signed-off-by: Hakan BERG <hakan.berg@stericsson.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com> Reviewed-by: Srinidhi KASAGAR <srinidhi.kasagar@stericsson.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/ab8500_fg.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/power/ab8500_fg.c b/drivers/power/ab8500_fg.c
index a747c5ce3b27..d1f93098a412 100644
--- a/drivers/power/ab8500_fg.c
+++ b/drivers/power/ab8500_fg.c
@@ -1354,9 +1354,6 @@ static void ab8500_fg_check_capacity_limits(struct ab8500_fg *di, bool init)
* algorithm says.
*/
di->bat_cap.prev_percent = 1;
- di->bat_cap.permille = 1;
- di->bat_cap.prev_mah = 1;
- di->bat_cap.mah = 1;
percent = 1;
changed = true;
@@ -1768,9 +1765,10 @@ static void ab8500_fg_algorithm(struct ab8500_fg *di)
ab8500_fg_algorithm_discharging(di);
}
- dev_dbg(di->dev, "[FG_DATA] %d %d %d %d %d %d %d %d %d "
+ dev_dbg(di->dev, "[FG_DATA] %d %d %d %d %d %d %d %d %d %d "
"%d %d %d %d %d %d %d\n",
di->bat_cap.max_mah_design,
+ di->bat_cap.max_mah,
di->bat_cap.mah,
di->bat_cap.permille,
di->bat_cap.level,