1 From e5e9808fd5ed9cb54dd9da9fb91b32c4f7e9da52 Mon Sep 17 00:00:00 2001
2 From: Dmitry Baryshkov <dbaryshkov@gmail.com>
3 Date: Wed, 9 Jan 2008 02:08:17 +0300
4 Subject: [PATCH 27/64] Add LiMn (one of the most common for small non-rechargable batteries)i
5 battery technology and voltage_min/_max properties support.
7 Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
9 drivers/power/power_supply_sysfs.c | 5 ++++-
10 include/linux/power_supply.h | 3 +++
11 2 files changed, 7 insertions(+), 1 deletions(-)
13 diff --git a/drivers/power/power_supply_sysfs.c b/drivers/power/power_supply_sysfs.c
14 index 249f61b..45d2f95 100644
15 --- a/drivers/power/power_supply_sysfs.c
16 +++ b/drivers/power/power_supply_sysfs.c
17 @@ -46,7 +46,8 @@ static ssize_t power_supply_show_property(struct device *dev,
20 static char *technology_text[] = {
21 - "Unknown", "NiMH", "Li-ion", "Li-poly", "LiFe", "NiCd"
22 + "Unknown", "NiMH", "Li-ion", "Li-poly", "LiFe", "NiCd",
25 static char *capacity_level_text[] = {
26 "Unknown", "Critical", "Low", "Normal", "High", "Full"
27 @@ -88,6 +89,8 @@ static struct device_attribute power_supply_attrs[] = {
28 POWER_SUPPLY_ATTR(present),
29 POWER_SUPPLY_ATTR(online),
30 POWER_SUPPLY_ATTR(technology),
31 + POWER_SUPPLY_ATTR(voltage_max),
32 + POWER_SUPPLY_ATTR(voltage_min),
33 POWER_SUPPLY_ATTR(voltage_max_design),
34 POWER_SUPPLY_ATTR(voltage_min_design),
35 POWER_SUPPLY_ATTR(voltage_now),
36 diff --git a/include/linux/power_supply.h b/include/linux/power_supply.h
37 index 606c095..cdbc5b8 100644
38 --- a/include/linux/power_supply.h
39 +++ b/include/linux/power_supply.h
40 @@ -54,6 +54,7 @@ enum {
41 POWER_SUPPLY_TECHNOLOGY_LIPO,
42 POWER_SUPPLY_TECHNOLOGY_LiFe,
43 POWER_SUPPLY_TECHNOLOGY_NiCd,
44 + POWER_SUPPLY_TECHNOLOGY_LiMn,
48 @@ -72,6 +73,8 @@ enum power_supply_property {
49 POWER_SUPPLY_PROP_PRESENT,
50 POWER_SUPPLY_PROP_ONLINE,
51 POWER_SUPPLY_PROP_TECHNOLOGY,
52 + POWER_SUPPLY_PROP_VOLTAGE_MAX,
53 + POWER_SUPPLY_PROP_VOLTAGE_MIN,
54 POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN,
55 POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN,
56 POWER_SUPPLY_PROP_VOLTAGE_NOW,