From: Rajkumar Kasirajan Date: Wed, 30 May 2012 09:24:28 +0000 (+0530) Subject: ab8500-fg: Use correct battery charge full design X-Git-Tag: upstream/snapshot3+hdmi~5720^2~7^2~3 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1a793a10899487d40ac3071f52a6e231260d935d;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git 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 Signed-off-by: Lee Jones Reviewed-by: Vijaya Kumar K-1 Reviewed-by: Marcus COOPER Reviewed-by: Olivier CLERGEAUD Reviewed-by: Arun MURTHY Reviewed-by: Rabin VINCENT Tested-by: Rupesh KUMAR Tested-by: Jonas ABERG --- diff --git a/drivers/power/ab8500_fg.c b/drivers/power/ab8500_fg.c index f94c966..25dae4c 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) case POWER_SUPPLY_PROP_TECHNOLOGY: switch (ext->type) { case POWER_SUPPLY_TYPE_BATTERY: - if (!di->flags.batt_id_received) { + if (!di->flags.batt_id_received && + di->bm->batt_id != BATTERY_UNKNOWN) { const struct abx500_battery_type *b; b = &(di->bm->bat_type[di->bm->batt_id]);