aboutsummaryrefslogtreecommitdiff
path: root/drivers/power
diff options
context:
space:
mode:
authorArtur Rojek <contact@artur-rojek.eu>2019-02-17 15:29:11 +0100
committerSebastian Reichel <sebastian.reichel@collabora.com>2019-02-20 00:33:08 +0100
commit04fb53101edef67517f2d5dc00c1a5eb707fe101 (patch)
tree3fd8769e741aecc654e1426b898539ff9839f03f /drivers/power
parent5ddfed2bffcd2a6f624c5f9224d31d434e44812f (diff)
downloadlinux-stericsson-04fb53101edef67517f2d5dc00c1a5eb707fe101.tar.gz
power: supply: core: Add a field to support battery max voltage
Add a field for "voltage_max_design_uv" to present fully charged battery voltage. Signed-off-by: Artur Rojek <contact@artur-rojek.eu> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power')
-rw-r--r--drivers/power/supply/power_supply_core.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/power/supply/power_supply_core.c b/drivers/power/supply/power_supply_core.c
index 07a85e19615c..c917a8b43b2b 100644
--- a/drivers/power/supply/power_supply_core.c
+++ b/drivers/power/supply/power_supply_core.c
@@ -573,6 +573,7 @@ int power_supply_get_battery_info(struct power_supply *psy,
info->energy_full_design_uwh = -EINVAL;
info->charge_full_design_uah = -EINVAL;
info->voltage_min_design_uv = -EINVAL;
+ info->voltage_max_design_uv = -EINVAL;
info->precharge_current_ua = -EINVAL;
info->charge_term_current_ua = -EINVAL;
info->constant_charge_current_max_ua = -EINVAL;
@@ -613,6 +614,8 @@ int power_supply_get_battery_info(struct power_supply *psy,
&info->charge_full_design_uah);
of_property_read_u32(battery_np, "voltage-min-design-microvolt",
&info->voltage_min_design_uv);
+ of_property_read_u32(battery_np, "voltage-max-design-microvolt",
+ &info->voltage_max_design_uv);
of_property_read_u32(battery_np, "precharge-current-microamp",
&info->precharge_current_ua);
of_property_read_u32(battery_np, "charge-term-current-microamp",