Commit e82c5bdb authored by Martin Bergstrom's avatar Martin Bergstrom Committed by Lee Jones

ab8500-fg: Report unscaled capacity

Unscaled capacity should be reported for POWER_SUPPLY_PROP_CAPACITY.
Signed-off-by: default avatarMartin Bergstrom <martin.bergstrom@stericsson.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
Reviewed-by: default avatarMarcus COOPER <marcus.xm.cooper@stericsson.com>
Tested-by: default avatarJonas ABERG <jonas.aberg@stericsson.com>
parent 93ff722e
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment