aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/power/ds2760_battery.c
diff options
context:
space:
mode:
authorDaniel Mack <daniel@caiaq.de>2009-07-15 12:20:39 -0400
committerAnton Vorontsov <cbouatmailru@gmail.com>2009-07-30 09:36:29 -0400
commit5c6e9bf2c96e746237516bc8897add67682ee452 (patch)
tree3a7a300f3d91501c64578774bfe40cb610e44c49 /drivers/power/ds2760_battery.c
parent2e83a5c5d2317c386de2880eb43ef0bef8eb1fa9 (diff)
ds2760_battery: export more features
Export POWER_SUPPLY_PROP_TIME_TO_EMPTY_NOW and POWER_SUPPLY_PROP_CAPACITY features to the power supply core. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Szabolcs Gyurko <szabolcs.gyurko@tlt.hu> Acked-by: Matt Reimer <mreimer@vpop.net> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
Diffstat (limited to 'drivers/power/ds2760_battery.c')
-rw-r--r--drivers/power/ds2760_battery.c8
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
358static int ds2760_battery_probe(struct platform_device *pdev) 366static int ds2760_battery_probe(struct platform_device *pdev)