From 939d07fc4e5e7eee8e493c5edbae6053ee05668e Mon Sep 17 00:00:00 2001 From: Vincent Palatin Date: Thu, 1 Oct 2015 15:51:58 -0700 Subject: charge_state_v2: add option to cut-off battery when level is critical Add a build option CONFIG_BATTERY_CRITICAL_SHUTDOWN_CUT_OFF to perform a battery cut-off when we reach the battery critical low level. Signed-off-by: Vincent Palatin BRANCH=smaug BUG=none TEST=Discharge a Ryu device down to the critical level, see the message and verify we cannot restart with the power button. Also check that plugging the charger revives the device and starts charging. Change-Id: Ic132a658de5c5131a6a1dd1ce343196b68d480f6 Reviewed-on: https://chromium-review.googlesource.com/303549 Tested-by: Vincent Palatin Reviewed-by: Todd Broch Commit-Queue: Vincent Palatin (cherry picked from commit 80b3c99319771312d5733b126b6b3eb839addde9) Reviewed-on: https://chromium-review.googlesource.com/303812 Commit-Ready: Vincent Palatin --- include/config.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include') diff --git a/include/config.h b/include/config.h index f87afc8f6b..9f0a10faf1 100644 --- a/include/config.h +++ b/include/config.h @@ -191,6 +191,9 @@ */ #define CONFIG_BATTERY_CRITICAL_SHUTDOWN_TIMEOUT 30 +/* Perform a battery cut-off when we reach the battery critical level */ +#undef CONFIG_BATTERY_CRITICAL_SHUTDOWN_CUT_OFF + /* * Support battery cut-off as host command and console command. * -- cgit v1.2.1