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 87 Battery driver also can use this attribute just to inform userspace 88 88 about maximal and minimal voltage thresholds of a given battery. 89 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 + 90 94 CHARGE_FULL_DESIGN, CHARGE_EMPTY_DESIGN - design charge values, when 91 95 battery considered full/empty. 92 96
+4 -1
drivers/power/power_supply_sysfs.c
··· 48 48 "Unspecified failure" 49 49 }; 50 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 54 ssize_t ret; 54 55 struct power_supply *psy = dev_get_drvdata(dev); ··· 85 84 POWER_SUPPLY_ATTR(present), 86 85 POWER_SUPPLY_ATTR(online), 87 86 POWER_SUPPLY_ATTR(technology), 87 + POWER_SUPPLY_ATTR(voltage_max), 88 + POWER_SUPPLY_ATTR(voltage_min), 88 89 POWER_SUPPLY_ATTR(voltage_max_design), 89 90 POWER_SUPPLY_ATTR(voltage_min_design), 90 91 POWER_SUPPLY_ATTR(voltage_now),
+3
include/linux/power_supply.h
··· 54 54 POWER_SUPPLY_TECHNOLOGY_LIPO, 55 55 POWER_SUPPLY_TECHNOLOGY_LiFe, 56 56 POWER_SUPPLY_TECHNOLOGY_NiCd, 57 + POWER_SUPPLY_TECHNOLOGY_LiMn, 57 58 }; 58 59 59 60 enum power_supply_property { ··· 64 63 POWER_SUPPLY_PROP_PRESENT, 65 64 POWER_SUPPLY_PROP_ONLINE, 66 65 POWER_SUPPLY_PROP_TECHNOLOGY, 66 + POWER_SUPPLY_PROP_VOLTAGE_MAX, 67 + POWER_SUPPLY_PROP_VOLTAGE_MIN, 67 68 POWER_SUPPLY_PROP_VOLTAGE_MAX_DESIGN, 68 69 POWER_SUPPLY_PROP_VOLTAGE_MIN_DESIGN, 69 70 POWER_SUPPLY_PROP_VOLTAGE_NOW,