Commit 04fb5310 authored by Artur Rojek's avatar Artur Rojek Committed by Sebastian Reichel

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: default avatarArtur Rojek <contact@artur-rojek.eu>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 5ddfed2b
...@@ -573,6 +573,7 @@ int power_supply_get_battery_info(struct power_supply *psy, ...@@ -573,6 +573,7 @@ int power_supply_get_battery_info(struct power_supply *psy,
info->energy_full_design_uwh = -EINVAL; info->energy_full_design_uwh = -EINVAL;
info->charge_full_design_uah = -EINVAL; info->charge_full_design_uah = -EINVAL;
info->voltage_min_design_uv = -EINVAL; info->voltage_min_design_uv = -EINVAL;
info->voltage_max_design_uv = -EINVAL;
info->precharge_current_ua = -EINVAL; info->precharge_current_ua = -EINVAL;
info->charge_term_current_ua = -EINVAL; info->charge_term_current_ua = -EINVAL;
info->constant_charge_current_max_ua = -EINVAL; info->constant_charge_current_max_ua = -EINVAL;
...@@ -613,6 +614,8 @@ int power_supply_get_battery_info(struct power_supply *psy, ...@@ -613,6 +614,8 @@ int power_supply_get_battery_info(struct power_supply *psy,
&info->charge_full_design_uah); &info->charge_full_design_uah);
of_property_read_u32(battery_np, "voltage-min-design-microvolt", of_property_read_u32(battery_np, "voltage-min-design-microvolt",
&info->voltage_min_design_uv); &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", of_property_read_u32(battery_np, "precharge-current-microamp",
&info->precharge_current_ua); &info->precharge_current_ua);
of_property_read_u32(battery_np, "charge-term-current-microamp", of_property_read_u32(battery_np, "charge-term-current-microamp",
......
...@@ -332,6 +332,7 @@ struct power_supply_battery_info { ...@@ -332,6 +332,7 @@ struct power_supply_battery_info {
int energy_full_design_uwh; /* microWatt-hours */ int energy_full_design_uwh; /* microWatt-hours */
int charge_full_design_uah; /* microAmp-hours */ int charge_full_design_uah; /* microAmp-hours */
int voltage_min_design_uv; /* microVolts */ int voltage_min_design_uv; /* microVolts */
int voltage_max_design_uv; /* microVolts */
int precharge_current_ua; /* microAmps */ int precharge_current_ua; /* microAmps */
int charge_term_current_ua; /* microAmps */ int charge_term_current_ua; /* microAmps */
int constant_charge_current_max_ua; /* microAmps */ int constant_charge_current_max_ua; /* microAmps */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment