diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2021-06-29 11:15:55 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-06-29 19:58:51 +0000 |
commit | 9fe1acf064782eaa8ce2b0039f0ff17f3e552421 (patch) | |
tree | 9e61b59c7ef2d10c7494b5a3b66505214850085a /include/config.h | |
parent | e1807baa12054ec4adfb4319506f960ea9046df5 (diff) | |
download | chrome-ec-9fe1acf064782eaa8ce2b0039f0ff17f3e552421.tar.gz |
battery: Set host's low battery shutdown SoC to 3%
Currently, the host's low battery shutdown SoC is 2%. This is the
same as EC's low battery shutdown threshold. The EC waits for 30 secs
before it triggers the low battery shutdown and powerd reads the SoC
every 30 secs. Thus, in most cases powerd can shut down the system
gracefully but these delays can be configured differently and the
system may be too busy to process all shutdown tasks within 30 secs.
This patch increases the host's shutdown SoC to 3%. This will further
guarantee that powerd will be given enough time to do everything for
a proper shutdown. It also avoids deeply discharging the battery,
which is bad for the battery health.
BUG=b:191837893
BRANCH=None
TEST=Altas using battfake EC command.
Change-Id: I3ab23205b400a1a326a60b8f9501611c027183b2
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2994747
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'include/config.h')
-rw-r--r-- | include/config.h | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/include/config.h b/include/config.h index 86589f5976..1c4cde6a7d 100644 --- a/include/config.h +++ b/include/config.h @@ -652,18 +652,20 @@ * Thus, we set them as follows by default: * * CONFIG_CHARGER_MIN_BAT_PCT_FOR_POWER_ON = 2 (don't boot if soc < 2%) - * CONFIG_BATT_HOST_SHUTDOWN_PERCENTAGE = 2 (shutdown if soc <= 2%) + * CONFIG_BATT_HOST_SHUTDOWN_PERCENTAGE = 3 (shutdown if soc <= 3%) * BATTERY_LEVEL_SHUTDOWN = 3 (shutdown if soc < 3%) * * This produces the following behavior: * * - If soc = 1%, system doesn't boot. User wouldn't know why. - * - If soc = 2%, system boots. Alert is shown. System immediately shuts down. - * - If battery discharges to 2% while the system is running, system shuts down. + * - If soc = 2~3%, system boots. Alert is shown. System immediately shuts down. + * - If battery discharges to 3% while the system is running, system shuts down. * If that happens while a user is away, they can press the power button to * learn what happened. + * - If system fails to shutdown for some reason and battery further discharges + * to 2%, EC will trigger shutdown. */ -#define CONFIG_BATT_HOST_SHUTDOWN_PERCENTAGE 2 /* shutdown if soc <= 2% */ +#define CONFIG_BATT_HOST_SHUTDOWN_PERCENTAGE 3 /* shutdown if soc <= 3% */ /* * Powerd's full_factor. The value comes from: |