ab8500-fg: Report unscaled capacity
authorMartin Bergstrom <martin.bergstrom@stericsson.com>
Fri, 8 Jun 2012 14:21:48 +0000 (16:21 +0200)
committerLee Jones <lee.jones@linaro.org>
Thu, 7 Mar 2013 04:35:36 +0000 (12:35 +0800)
Unscaled capacity should be reported for POWER_SUPPLY_PROP_CAPACITY.

Signed-off-by: Martin Bergstrom <martin.bergstrom@stericsson.com>
Signed-off-by: Lee Jones <lee.jones@linaro.org>
Reviewed-by: Marcus COOPER <marcus.xm.cooper@stericsson.com>
Tested-by: Jonas ABERG <jonas.aberg@stericsson.com>
drivers/power/ab8500_fg.c

index 92f342b..a747c5c 100644 (file)
@@ -2153,9 +2153,7 @@ static int ab8500_fg_get_property(struct power_supply *psy,
                        val->intval = di->bat_cap.prev_mah;
                break;
        case POWER_SUPPLY_PROP_CAPACITY:
-               if (di->bm->capacity_scaling)
-                       val->intval = di->bat_cap.cap_scale.scaled_cap;
-               else if (di->flags.batt_unknown && !di->bm->chg_unknown_bat &&
+               if (di->flags.batt_unknown && !di->bm->chg_unknown_bat &&
                                di->flags.batt_id_received)
                        val->intval = 100;
                else