diff options
-rw-r--r-- | drivers/power/ds2760_battery.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/drivers/power/ds2760_battery.c b/drivers/power/ds2760_battery.c index cf07c43e90cd..f439071c2aa2 100644 --- a/drivers/power/ds2760_battery.c +++ b/drivers/power/ds2760_battery.c | |||
@@ -337,6 +337,12 @@ static int ds2760_battery_get_property(struct power_supply *psy, | |||
337 | case POWER_SUPPLY_PROP_TEMP: | 337 | case POWER_SUPPLY_PROP_TEMP: |
338 | val->intval = di->temp_C; | 338 | val->intval = di->temp_C; |
339 | break; | 339 | break; |
340 | case POWER_SUPPLY_PROP_TIME_TO_EMPTY_NOW: | ||
341 | val->intval = di->life_sec; | ||
342 | break; | ||
343 | case POWER_SUPPLY_PROP_CAPACITY: | ||
344 | val->intval = di->rem_capacity; | ||
345 | break; | ||
340 | default: | 346 | default: |
341 | return -EINVAL; | 347 | return -EINVAL; |
342 | } | 348 | } |
@@ -353,6 +359,8 @@ static enum power_supply_property ds2760_battery_props[] = { | |||
353 | POWER_SUPPLY_PROP_CHARGE_EMPTY, | 359 | POWER_SUPPLY_PROP_CHARGE_EMPTY, |
354 | POWER_SUPPLY_PROP_CHARGE_NOW, | 360 | POWER_SUPPLY_PROP_CHARGE_NOW, |
355 | POWER_SUPPLY_PROP_TEMP, | 361 | POWER_SUPPLY_PROP_TEMP, |
362 | POWER_SUPPLY_PROP_TIME_TO_EMPTY_NOW, | ||
363 | POWER_SUPPLY_PROP_CAPACITY, | ||
356 | }; | 364 | }; |
357 | 365 | ||
358 | static int ds2760_battery_probe(struct platform_device *pdev) | 366 | static int ds2760_battery_probe(struct platform_device *pdev) |