diff options
Diffstat (limited to 'common/power_button_x86.c')
-rw-r--r-- | common/power_button_x86.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/common/power_button_x86.c b/common/power_button_x86.c index 8b221b8e30..9570d9c3b3 100644 --- a/common/power_button_x86.c +++ b/common/power_button_x86.c @@ -116,10 +116,12 @@ static void set_pwrbtn_to_pch(int high) { /* * If the battery is discharging and low enough we'd shut down the - * system, don't press the power button. + * system, don't press the power button. Also, don't press the + * power button if the battery is charging but the battery level + * is too low. */ #ifdef CONFIG_CHARGER - if (!high && charge_want_shutdown()) { + if (!high && (charge_want_shutdown() || charge_prevent_power_on())) { CPRINTS("PB PCH pwrbtn ignored due to battery level"); high = 1; } |