Verified Commit e52d6ceb authored by Sebastian Krzyszkowiak's avatar Sebastian Krzyszkowiak
Browse files

power: max17042_battery: Export charge termination current property



The value is there, so let's export it.
Signed-off-by: Sebastian Krzyszkowiak's avatarSebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>
parent 5879af7d
......@@ -78,6 +78,7 @@ static enum power_supply_property max17042_battery_props[] = {
POWER_SUPPLY_PROP_CHARGE_FULL,
POWER_SUPPLY_PROP_CHARGE_NOW,
POWER_SUPPLY_PROP_CHARGE_COUNTER,
POWER_SUPPLY_PROP_CHARGE_TERM_CURRENT,
POWER_SUPPLY_PROP_TEMP,
POWER_SUPPLY_PROP_TEMP_ALERT_MIN,
POWER_SUPPLY_PROP_TEMP_ALERT_MAX,
......@@ -414,6 +415,14 @@ static int max17042_get_property(struct power_supply *psy,
return -EINVAL;
}
break;
case POWER_SUPPLY_PROP_CHARGE_TERM_CURRENT:
ret = regmap_read(map, MAX17042_ICHGTerm, &data);
if (ret < 0)
return ret;
data64 = data * 1562500ll;
val->intval = div_s64(data64, chip->pdata->r_sns);
break;
case POWER_SUPPLY_PROP_TIME_TO_EMPTY_NOW:
ret = regmap_read(map, MAX17042_TTE, &data);
if (ret < 0)
......
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