diff options
author | Rajkumar Kasirajan <rajkumar.kasirajan@stericsson.com> | 2012-05-30 05:24:28 -0400 |
---|---|---|
committer | Lee Jones <lee.jones@linaro.org> | 2013-01-23 09:39:20 -0500 |
commit | 1a793a10899487d40ac3071f52a6e231260d935d (patch) | |
tree | 39b04ee77ef7739107c45938383119e010ad0c45 /drivers/power | |
parent | 3988043b0ee1104d4cca7c57bbc23b16ea798b6f (diff) |
ab8500-fg: Use correct battery charge full design
If battery is not identified while fg probe, mah_max_design gets
initialized with unknown battery's charge full design. Reinitialize
mah_max_design if battery is identified after fg probe.
Signed-off-by: Rajkumar Kasirajan <rajkumar.kasirajan@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Vijaya Kumar K-1 <vijay.kilari@stericsson.com>
Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com>
Reviewed-by: Olivier CLERGEAUD <olivier.clergeaud@stericsson.com>
Reviewed-by: Arun MURTHY <arun.murthy@stericsson.com>
Reviewed-by: Rabin VINCENT <rabin.vincent@stericsson.com>
Tested-by: Rupesh KUMAR <rupesh.kumar@stericsson.com>
Tested-by: Jonas ABERG <jonas.aberg@stericsson.com>
Diffstat (limited to 'drivers/power')
-rw-r--r-- | drivers/power/ab8500_fg.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/power/ab8500_fg.c b/drivers/power/ab8500_fg.c index f94c9661e47e..25dae4c4b0ef 100644 --- a/drivers/power/ab8500_fg.c +++ b/drivers/power/ab8500_fg.c | |||
@@ -2250,7 +2250,8 @@ static int ab8500_fg_get_ext_psy_data(struct device *dev, void *data) | |||
2250 | case POWER_SUPPLY_PROP_TECHNOLOGY: | 2250 | case POWER_SUPPLY_PROP_TECHNOLOGY: |
2251 | switch (ext->type) { | 2251 | switch (ext->type) { |
2252 | case POWER_SUPPLY_TYPE_BATTERY: | 2252 | case POWER_SUPPLY_TYPE_BATTERY: |
2253 | if (!di->flags.batt_id_received) { | 2253 | if (!di->flags.batt_id_received && |
2254 | di->bm->batt_id != BATTERY_UNKNOWN) { | ||
2254 | const struct abx500_battery_type *b; | 2255 | const struct abx500_battery_type *b; |
2255 | 2256 | ||
2256 | b = &(di->bm->bat_type[di->bm->batt_id]); | 2257 | b = &(di->bm->bat_type[di->bm->batt_id]); |