diff options
-rw-r--r-- | drivers/power/max17042_battery.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/power/max17042_battery.c b/drivers/power/max17042_battery.c index da7a75f..135cec1 100644 --- a/drivers/power/max17042_battery.c +++ b/drivers/power/max17042_battery.c @@ -94,6 +94,7 @@ static enum power_supply_property max17042_battery_props[] = { POWER_SUPPLY_PROP_HEALTH, POWER_SUPPLY_PROP_CURRENT_NOW, POWER_SUPPLY_PROP_CURRENT_AVG, + POWER_SUPPLY_PROP_TECHNOLOGY, }; static int max17042_get_temperature(struct max17042_chip *chip, int *temp) @@ -246,7 +247,7 @@ static int max17042_get_property(struct power_supply *psy, val->intval = data * 625 / 8; break; case POWER_SUPPLY_PROP_CAPACITY: - ret = regmap_read(map, MAX17042_RepSOC, &data); + ret = regmap_read(map, MAX17042_VFSOC, &data); if (ret < 0) return ret; @@ -332,6 +333,9 @@ static int max17042_get_property(struct power_supply *psy, return -EINVAL; } break; + case POWER_SUPPLY_PROP_TECHNOLOGY: + val->intval = POWER_SUPPLY_TECHNOLOGY_LION; + break; default: return -EINVAL; } @@ -392,6 +396,7 @@ static int max17042_property_is_writeable(struct power_supply *psy, switch (psp) { case POWER_SUPPLY_PROP_TEMP_ALERT_MIN: case POWER_SUPPLY_PROP_TEMP_ALERT_MAX: + case POWER_SUPPLY_PROP_TECHNOLOGY: ret = 1; break; default: |