power_supply: add few more values and props

Add LiMn (one of the most common for small non-rechargable batteries)
battery technology and voltage_min/_max properties support.

Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Signed-off-by: Anton Vorontsov <cbou@mail.ru>

authored by Dmitry Baryshkov and committed by Anton Vorontsov c7cc930f 9ef45106

+11 -1
+4
Documentation/power_supply_class.txt
··· 87 Battery driver also can use this attribute just to inform userspace 88 about maximal and minimal voltage thresholds of a given battery. 89 90 CHARGE_FULL_DESIGN, CHARGE_EMPTY_DESIGN - design charge values, when 91 battery considered full/empty. 92
··· 87 Battery driver also can use this attribute just to inform userspace 88 about maximal and minimal voltage thresholds of a given battery. 89 90 + VOLTAGE_MAX, VOLTAGE_MIN - same as _DESIGN voltage values except that 91 + these ones should be used if hardware could only guess (measure and 92 + retain) the thresholds of a given power supply. 93 + 94 CHARGE_FULL_DESIGN, CHARGE_EMPTY_DESIGN - design charge values, when 95 battery considered full/empty. 96
+4 -1
drivers/power/power_supply_sysfs.c
··· 48 "Unspecified failure" 49 }; 50 static char *technology_text[] = { 51 - "Unknown", "NiMH", "Li-ion", "Li-poly", "LiFe", "NiCd" 52 }; 53 ssize_t ret; 54 struct power_supply *psy = dev_get_drvdata(dev); ··· 85 POWER_SUPPLY_ATTR(present), 86 POWER_SUPPLY_ATTR(online), 87 POWER_SUPPLY_ATTR(technology), 88 POWER_SUPPLY_ATTR(voltage_max_design), 89 POWER_SUPPLY_ATTR(voltage_min_design), 90 POWER_SUPPLY_ATTR(voltage_now),
··· 48 "Unspecified failure" 49 }; 50 static char *technology_text[] = { 51 + "Unknown", "NiMH", "Li-ion", "Li-poly", "LiFe", "NiCd", 52 + "LiMn" 53 }; 54 ssize_t ret; 55 struct power_supply *psy = dev_get_drvdata(dev); ··· 84 POWER_SUPPLY_ATTR(present), 85 POWER_SUPPLY_ATTR(online), 86 POWER_SUPPLY_ATTR(technology), 87 + POWER_SUPPLY_ATTR(voltage_max), 88 + POWER_SUPPLY_ATTR(voltage_min), 89 POWER_SUPPLY_ATTR(voltage_max_design), 90 POWER_SUPPLY_ATTR(voltage_min_design), 91 POWER_SUPPLY_ATTR(voltage_now),
+3
include/linux/power_supply.h
··· 54 POWER_SUPPLY_TECHNOLOGY_LIPO, 55 POWER_SUPPLY_TECHNOLOGY_LiFe, 56 POWER_SUPPLY_TECHNOLOGY_NiCd, 57 }; 58 59 enum power_supply_property { ··· 64 POWER_SUPPLY_PROP_PRESENT, 65 POWER_SUPPLY_PROP_ONLINE, 66 POWER_SUPPLY_PROP_TECHNOLOGY, 67 POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN, 68 POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN, 69 POWER_SUPPLY_PROP_VOLTAGE_NOW,
··· 54 POWER_SUPPLY_TECHNOLOGY_LIPO, 55 POWER_SUPPLY_TECHNOLOGY_LiFe, 56 POWER_SUPPLY_TECHNOLOGY_NiCd, 57 + POWER_SUPPLY_TECHNOLOGY_LiMn, 58 }; 59 60 enum power_supply_property { ··· 63 POWER_SUPPLY_PROP_PRESENT, 64 POWER_SUPPLY_PROP_ONLINE, 65 POWER_SUPPLY_PROP_TECHNOLOGY, 66 + POWER_SUPPLY_PROP_VOLTAGE_MAX, 67 + POWER_SUPPLY_PROP_VOLTAGE_MIN, 68 POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN, 69 POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN, 70 POWER_SUPPLY_PROP_VOLTAGE_NOW,