mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 04:10:18 +09:00
power: rk81x-battery: modify low power check threshold voltage
Signed-off-by: Jianhong Chen <chenjh@rock-chips.com> Signed-off-by: 许盛飞 <xsf@rock-chips.com>
This commit is contained in:
@@ -1268,7 +1268,7 @@ static void rk81x_bat_set_power_supply_state(struct rk81x_battery *di,
|
||||
static void rk81x_bat_lowpwr_check(struct rk81x_battery *di)
|
||||
{
|
||||
static u64 time;
|
||||
int pwr_off_thresd = di->pdata->power_off_thresd - 50;
|
||||
int pwr_off_thresd = di->pdata->power_off_thresd;
|
||||
|
||||
if (di->current_avg < 0 && di->voltage < pwr_off_thresd) {
|
||||
if (!time)
|
||||
@@ -1278,6 +1278,11 @@ static void rk81x_bat_lowpwr_check(struct rk81x_battery *di)
|
||||
rk81x_bat_set_power_supply_state(di, NO_CHARGER);
|
||||
dev_info(di->dev, "low power....\n");
|
||||
}
|
||||
|
||||
if (di->voltage <= pwr_off_thresd - 50) {
|
||||
di->dsoc--;
|
||||
rk81x_bat_set_power_supply_state(di, NO_CHARGER);
|
||||
}
|
||||
} else {
|
||||
time = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user