summaryrefslogtreecommitdiff
path: root/common/charge_state_v2.c
diff options
context:
space:
mode:
Diffstat (limited to 'common/charge_state_v2.c')
-rw-r--r--common/charge_state_v2.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/common/charge_state_v2.c b/common/charge_state_v2.c
index a5d421c45b..e0ab8e5929 100644
--- a/common/charge_state_v2.c
+++ b/common/charge_state_v2.c
@@ -414,8 +414,14 @@ static inline int battery_too_low(void)
/* Shut everything down before the battery completely dies. */
static void prevent_deep_discharge(void)
{
- if (!battery_too_low())
+ if (!battery_too_low()) {
+ /* Reset shutdown warning time */
+ shutdown_warning_time.val = 0;
return;
+ }
+
+ CPRINTS("Low battery: %d%%, %dmV",
+ curr.batt.state_of_charge, curr.batt.voltage);
if (chipset_in_state(CHIPSET_STATE_ANY_OFF)) {
#ifdef CONFIG_HIBERNATE