aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/power_supply.h
diff options
context:
space:
mode:
authorAndres Salomon <dilinger@collabora.co.uk>2009-07-02 09:45:18 -0400
committerAnton Vorontsov <cbouatmailru@gmail.com>2009-07-02 10:14:37 -0400
commitee8076ed3e1cdd0cd1e61318386932669c90b92f (patch)
tree0ca72268b6c91a2a07920c93558ea70c32479845 /include/linux/power_supply.h
parent144bbeaedc53290eab21da82ce1cb5faefd14374 (diff)
power_supply: Add a charge_type property, and use it for olpc driver
This adds a new sysfs file called 'charge_type' which displays the type of charging (unknown, n/a, trickle charge, or fast charging). This allows things like battery diagnostics to determine what the battery/EC is doing without resorting to changing the 'status' sysfs output. Signed-off-by: Andres Salomon <dilinger@collabora.co.uk> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
Diffstat (limited to 'include/linux/power_supply.h')
-rw-r--r--include/linux/power_supply.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
index 0ab6aa171241..4c7c6fc35487 100644
--- a/include/linux/power_supply.h
+++ b/include/linux/power_supply.h
@@ -39,6 +39,13 @@ enum {
39}; 39};
40 40
41enum { 41enum {
42 POWER_SUPPLY_CHARGE_TYPE_UNKNOWN = 0,
43 POWER_SUPPLY_CHARGE_TYPE_NONE,
44 POWER_SUPPLY_CHARGE_TYPE_TRICKLE,
45 POWER_SUPPLY_CHARGE_TYPE_FAST,
46};
47
48enum {
42 POWER_SUPPLY_HEALTH_UNKNOWN = 0, 49 POWER_SUPPLY_HEALTH_UNKNOWN = 0,
43 POWER_SUPPLY_HEALTH_GOOD, 50 POWER_SUPPLY_HEALTH_GOOD,
44 POWER_SUPPLY_HEALTH_OVERHEAT, 51 POWER_SUPPLY_HEALTH_OVERHEAT,
@@ -70,6 +77,7 @@ enum {
70enum power_supply_property { 77enum power_supply_property {
71 /* Properties of type `int' */ 78 /* Properties of type `int' */
72 POWER_SUPPLY_PROP_STATUS = 0, 79 POWER_SUPPLY_PROP_STATUS = 0,
80 POWER_SUPPLY_PROP_CHARGE_TYPE,
73 POWER_SUPPLY_PROP_HEALTH, 81 POWER_SUPPLY_PROP_HEALTH,
74 POWER_SUPPLY_PROP_PRESENT, 82 POWER_SUPPLY_PROP_PRESENT,
75 POWER_SUPPLY_PROP_ONLINE, 83 POWER_SUPPLY_PROP_ONLINE,