projects
/
linux-2.6-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2e83a5c
)
ds2760_battery: export more features
author
Daniel Mack
<daniel@caiaq.de>
Wed, 15 Jul 2009 16:20:39 +0000
(18:20 +0200)
committer
Anton Vorontsov
<cbouatmailru@gmail.com>
Thu, 30 Jul 2009 13:36:29 +0000
(17:36 +0400)
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>
drivers/power/ds2760_battery.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/power/ds2760_battery.c
b/drivers/power/ds2760_battery.c
index cf07c43e90cdac8b84e882a381789745dc0a67d9..f439071c2aa2807ded191955364e84737638188a 100644
(file)
--- 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,
case POWER_SUPPLY_PROP_TEMP:
val->intval = di->temp_C;
break;
+ case POWER_SUPPLY_PROP_TIME_TO_EMPTY_NOW:
+ val->intval = di->life_sec;
+ break;
+ case POWER_SUPPLY_PROP_CAPACITY:
+ val->intval = di->rem_capacity;
+ break;
default:
return -EINVAL;
}
@@
-353,6
+359,8
@@
static enum power_supply_property ds2760_battery_props[] = {
POWER_SUPPLY_PROP_CHARGE_EMPTY,
POWER_SUPPLY_PROP_CHARGE_NOW,
POWER_SUPPLY_PROP_TEMP,
+ POWER_SUPPLY_PROP_TIME_TO_EMPTY_NOW,
+ POWER_SUPPLY_PROP_CAPACITY,
};
static int ds2760_battery_probe(struct platform_device *pdev)