From 8dc230347beb0ecd84cf419b94492be0a5ff90be Mon Sep 17 00:00:00 2001 From: Dmitry Baryshkov Date: Mon, 7 Jan 2008 04:12:41 +0300 Subject: [PATCH] --- yaml --- r: 82508 b: refs/heads/master c: c7cc930f9a5c26385a08cd7dc28cb5e3ed186d72 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/Documentation/power_supply_class.txt | 4 ++++ trunk/drivers/power/power_supply_sysfs.c | 5 ++++- trunk/include/linux/power_supply.h | 3 +++ 4 files changed, 12 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index cd4f032f4357..e3f83a6e4920 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 9ef45106261e802f9d80bf0bc652124b42b1f344 +refs/heads/master: c7cc930f9a5c26385a08cd7dc28cb5e3ed186d72 diff --git a/trunk/Documentation/power_supply_class.txt b/trunk/Documentation/power_supply_class.txt index a032c316b3bc..a8686e5a6857 100644 --- a/trunk/Documentation/power_supply_class.txt +++ b/trunk/Documentation/power_supply_class.txt @@ -87,6 +87,10 @@ batteries use voltage for very approximated calculation of capacity. Battery driver also can use this attribute just to inform userspace about maximal and minimal voltage thresholds of a given battery. +VOLTAGE_MAX, VOLTAGE_MIN - same as _DESIGN voltage values except that +these ones should be used if hardware could only guess (measure and +retain) the thresholds of a given power supply. + CHARGE_FULL_DESIGN, CHARGE_EMPTY_DESIGN - design charge values, when battery considered full/empty. diff --git a/trunk/drivers/power/power_supply_sysfs.c b/trunk/drivers/power/power_supply_sysfs.c index bab591ba785a..d4824840c5bf 100644 --- a/trunk/drivers/power/power_supply_sysfs.c +++ b/trunk/drivers/power/power_supply_sysfs.c @@ -48,7 +48,8 @@ static ssize_t power_supply_show_property(struct device *dev, "Unspecified failure" }; static char *technology_text[] = { - "Unknown", "NiMH", "Li-ion", "Li-poly", "LiFe", "NiCd" + "Unknown", "NiMH", "Li-ion", "Li-poly", "LiFe", "NiCd", + "LiMn" }; ssize_t ret; struct power_supply *psy = dev_get_drvdata(dev); @@ -84,6 +85,8 @@ static struct device_attribute power_supply_attrs[] = { POWER_SUPPLY_ATTR(present), POWER_SUPPLY_ATTR(online), POWER_SUPPLY_ATTR(technology), + POWER_SUPPLY_ATTR(voltage_max), + POWER_SUPPLY_ATTR(voltage_min), POWER_SUPPLY_ATTR(voltage_max_design), POWER_SUPPLY_ATTR(voltage_min_design), POWER_SUPPLY_ATTR(voltage_now), diff --git a/trunk/include/linux/power_supply.h b/trunk/include/linux/power_supply.h index 358b38d09fe0..5cbf3e371012 100644 --- a/trunk/include/linux/power_supply.h +++ b/trunk/include/linux/power_supply.h @@ -54,6 +54,7 @@ enum { POWER_SUPPLY_TECHNOLOGY_LIPO, POWER_SUPPLY_TECHNOLOGY_LiFe, POWER_SUPPLY_TECHNOLOGY_NiCd, + POWER_SUPPLY_TECHNOLOGY_LiMn, }; enum power_supply_property { @@ -63,6 +64,8 @@ enum power_supply_property { POWER_SUPPLY_PROP_PRESENT, POWER_SUPPLY_PROP_ONLINE, POWER_SUPPLY_PROP_TECHNOLOGY, + POWER_SUPPLY_PROP_VOLTAGE_MAX, + POWER_SUPPLY_PROP_VOLTAGE_MIN, POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN, POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN, POWER_SUPPLY_PROP_VOLTAGE_NOW,