summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKim, Milo <Milo.Kim@ti.com>2011-11-30 23:08:33 -0800
committerAnton Vorontsov <cbouatmailru@gmail.com>2012-01-04 09:05:51 +0400
commit9b8872273af6983b246252a6508fa7cf34c69d6e (patch)
treeb9b996c704fe98b46f3e58434f3f70f6171bbb67
parentce09affc59bca2a1ac1f77b75915fd914fab1f70 (diff)
downloadblackbird-op-linux-9b8872273af6983b246252a6508fa7cf34c69d6e.tar.gz
blackbird-op-linux-9b8872273af6983b246252a6508fa7cf34c69d6e.zip
power_supply: Add "unknown" in power supply type
For the default value of power supply type, "unknown" is added. With default prop value, supply type property can be displayed as default - "Unknown". Signed-off-by: Milo(Woogyom) Kim <milo.kim@ti.com> Signed-off-by: Anton Vorontsov <cbouatmailru@gmail.com>
-rw-r--r--drivers/power/power_supply_sysfs.c2
-rw-r--r--include/linux/power_supply.h3
2 files changed, 3 insertions, 2 deletions
diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c
index 58cc4906d216..939e2e432553 100644
--- a/drivers/power/power_supply_sysfs.c
+++ b/drivers/power/power_supply_sysfs.c
@@ -42,7 +42,7 @@ static ssize_t power_supply_show_property(struct device *dev,
struct device_attribute *attr,
char *buf) {
static char *type_text[] = {
- "Battery", "UPS", "Mains", "USB",
+ "Unknown", "Battery", "UPS", "Mains", "USB",
"USB_DCP", "USB_CDP", "USB_ACA"
};
static char *status_text[] = {
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
index 204c18dfdc9e..9c83e04f6a43 100644
--- a/include/linux/power_supply.h
+++ b/include/linux/power_supply.h
@@ -123,7 +123,8 @@ enum power_supply_property {
};
enum power_supply_type {
- POWER_SUPPLY_TYPE_BATTERY = 0,
+ POWER_SUPPLY_TYPE_UNKNOWN = 0,
+ POWER_SUPPLY_TYPE_BATTERY,
POWER_SUPPLY_TYPE_UPS,
POWER_SUPPLY_TYPE_MAINS,
POWER_SUPPLY_TYPE_USB, /* Standard Downstream Port */
OpenPOWER on IntegriCloud