diff options
author | Heikki Krogerus <ext-heikki.krogerus@nokia.com> | 2010-10-04 03:51:37 -0400 |
---|---|---|
committer | Anton Vorontsov <cbouatmailru@gmail.com> | 2010-10-06 09:37:09 -0400 |
commit | 85efc8a18cedf70e55acd0c825e2d9d2f3b19999 (patch) | |
tree | 2d137c74957bae19ecab4fe8d75dbe238184b9b7 | |
parent | 353f867b5536e55e46801562987d605778cf262b (diff) |
power_supply: Add types for USB chargers
This adds power supply types for USB chargers defined in
Battery Charging Specification 1.1.
Signed-off-by: Heikki Krogerus <ext-heikki.krogerus@nokia.com>
Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
-rw-r--r-- | drivers/power/power_supply_sysfs.c | 3 | ||||
-rw-r--r-- | include/linux/power_supply.h | 5 |
2 files changed, 6 insertions, 2 deletions
diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c index 9d30eeb8c81..88f5e43100c 100644 --- a/drivers/power/power_supply_sysfs.c +++ b/drivers/power/power_supply_sysfs.c | |||
@@ -42,7 +42,8 @@ static ssize_t power_supply_show_property(struct device *dev, | |||
42 | struct device_attribute *attr, | 42 | struct device_attribute *attr, |
43 | char *buf) { | 43 | char *buf) { |
44 | static char *type_text[] = { | 44 | static char *type_text[] = { |
45 | "Battery", "UPS", "Mains", "USB" | 45 | "Battery", "UPS", "Mains", "USB", |
46 | "USB_DCP", "USB_CDP", "USB_ACA" | ||
46 | }; | 47 | }; |
47 | static char *status_text[] = { | 48 | static char *status_text[] = { |
48 | "Unknown", "Charging", "Discharging", "Not charging", "Full" | 49 | "Unknown", "Charging", "Discharging", "Not charging", "Full" |
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h index 30083a896f3..d37fef67ece 100644 --- a/include/linux/power_supply.h +++ b/include/linux/power_supply.h | |||
@@ -125,7 +125,10 @@ enum power_supply_type { | |||
125 | POWER_SUPPLY_TYPE_BATTERY = 0, | 125 | POWER_SUPPLY_TYPE_BATTERY = 0, |
126 | POWER_SUPPLY_TYPE_UPS, | 126 | POWER_SUPPLY_TYPE_UPS, |
127 | POWER_SUPPLY_TYPE_MAINS, | 127 | POWER_SUPPLY_TYPE_MAINS, |
128 | POWER_SUPPLY_TYPE_USB, | 128 | POWER_SUPPLY_TYPE_USB, /* Standard Downstream Port */ |
129 | POWER_SUPPLY_TYPE_USB_DCP, /* Dedicated Charging Port */ | ||
130 | POWER_SUPPLY_TYPE_USB_CDP, /* Charging Downstream Port */ | ||
131 | POWER_SUPPLY_TYPE_USB_ACA, /* Accessory Charger Adapters */ | ||
129 | }; | 132 | }; |
130 | 133 | ||
131 | union power_supply_propval { | 134 | union power_supply_propval { |