mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
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: Yuanjiang Yu <[email protected]> Signed-off-by: Baolin Wang <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]>
This commit is contained in:
parent
7384b0e766
commit
ff062d0694
1 changed files with 2 additions and 0 deletions
|
|
@ -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);
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue