Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ff062d06 authored by Yuanjiang Yu's avatar Yuanjiang Yu Committed by Sebastian Reichel
Browse files

power: supply: sc27xx: Make sure the alarm capacity is larger than 0



We must make sure the alarm capacity is larger than 0, to help to
calibrate the low battery capacity.

Signed-off-by: default avatarYuanjiang Yu <yuanjiang.yu@unisoc.com>
Signed-off-by: default avatarBaolin Wang <baolin.wang@linaro.org>
Signed-off-by: default avatarSebastian Reichel <sebastian.reichel@collabora.com>
parent 7384b0e7
Loading
Loading
Loading
Loading
+2 −0
Original line number Diff line number Diff line
@@ -858,6 +858,8 @@ static int sc27xx_fgu_hw_init(struct sc27xx_fgu_data *data)
	data->alarm_cap = power_supply_ocv2cap_simple(data->cap_table,
						      data->table_len,
						      data->min_volt);
	if (!data->alarm_cap)
		data->alarm_cap += 1;

	power_supply_put_battery_info(data->battery, &info);