aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Documentation/power_supply_class.txt4
-rw-r--r--drivers/power/power_supply_sysfs.c5
-rw-r--r--include/linux/power_supply.h3
3 files changed, 11 insertions, 1 deletions
diff --git a/Documentation/power_supply_class.txt b/Documentation/power_supply_class.txt
index a032c316b3bc..a8686e5a6857 100644
--- a/Documentation/power_supply_class.txt
+++ b/Documentation/power_supply_class.txt
@@ -87,6 +87,10 @@ batteries use voltage for very approximated calculation of capacity.
87Battery driver also can use this attribute just to inform userspace 87Battery driver also can use this attribute just to inform userspace
88about maximal and minimal voltage thresholds of a given battery. 88about maximal and minimal voltage thresholds of a given battery.
89 89
90VOLTAGE_MAX, VOLTAGE_MIN - same as _DESIGN voltage values except that
91these ones should be used if hardware could only guess (measure and
92retain) the thresholds of a given power supply.
93
90CHARGE_FULL_DESIGN, CHARGE_EMPTY_DESIGN - design charge values, when 94CHARGE_FULL_DESIGN, CHARGE_EMPTY_DESIGN - design charge values, when
91battery considered full/empty. 95battery considered full/empty.
92 96
diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c
index bab591ba785a..d4824840c5bf 100644
--- a/drivers/power/power_supply_sysfs.c
+++ b/drivers/power/power_supply_sysfs.c
@@ -48,7 +48,8 @@ static ssize_t power_supply_show_property(struct device *dev,
48 "Unspecified failure" 48 "Unspecified failure"
49 }; 49 };
50 static char *technology_text[] = { 50 static char *technology_text[] = {
51 "Unknown", "NiMH", "Li-ion", "Li-poly", "LiFe", "NiCd" 51 "Unknown", "NiMH", "Li-ion", "Li-poly", "LiFe", "NiCd",
52 "LiMn"
52 }; 53 };
53 ssize_t ret; 54 ssize_t ret;
54 struct power_supply *psy = dev_get_drvdata(dev); 55 struct power_supply *psy = dev_get_drvdata(dev);
@@ -84,6 +85,8 @@ static struct device_attribute power_supply_attrs[] = {
84 POWER_SUPPLY_ATTR(present), 85 POWER_SUPPLY_ATTR(present),
85 POWER_SUPPLY_ATTR(online), 86 POWER_SUPPLY_ATTR(online),
86 POWER_SUPPLY_ATTR(technology), 87 POWER_SUPPLY_ATTR(technology),
88 POWER_SUPPLY_ATTR(voltage_max),
89 POWER_SUPPLY_ATTR(voltage_min),
87 POWER_SUPPLY_ATTR(voltage_max_design), 90 POWER_SUPPLY_ATTR(voltage_max_design),
88 POWER_SUPPLY_ATTR(voltage_min_design), 91 POWER_SUPPLY_ATTR(voltage_min_design),
89 POWER_SUPPLY_ATTR(voltage_now), 92 POWER_SUPPLY_ATTR(voltage_now),
diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
index 358b38d09fe0..5cbf3e371012 100644
--- a/include/linux/power_supply.h
+++ b/include/linux/power_supply.h
@@ -54,6 +54,7 @@ enum {
54 POWER_SUPPLY_TECHNOLOGY_LIPO, 54 POWER_SUPPLY_TECHNOLOGY_LIPO,
55 POWER_SUPPLY_TECHNOLOGY_LiFe, 55 POWER_SUPPLY_TECHNOLOGY_LiFe,
56 POWER_SUPPLY_TECHNOLOGY_NiCd, 56 POWER_SUPPLY_TECHNOLOGY_NiCd,
57 POWER_SUPPLY_TECHNOLOGY_LiMn,
57}; 58};
58 59
59enum power_supply_property { 60enum power_supply_property {
@@ -63,6 +64,8 @@ enum power_supply_property {
63 POWER_SUPPLY_PROP_PRESENT, 64 POWER_SUPPLY_PROP_PRESENT,
64 POWER_SUPPLY_PROP_ONLINE, 65 POWER_SUPPLY_PROP_ONLINE,
65 POWER_SUPPLY_PROP_TECHNOLOGY, 66 POWER_SUPPLY_PROP_TECHNOLOGY,
67 POWER_SUPPLY_PROP_VOLTAGE_MAX,
68 POWER_SUPPLY_PROP_VOLTAGE_MIN,
66 POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN, 69 POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN,
67 POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN, 70 POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
68 POWER_SUPPLY_PROP_VOLTAGE_NOW, 71 POWER_SUPPLY_PROP_VOLTAGE_NOW,