diff options
author | Diana Z <dzigterman@chromium.org> | 2021-06-16 11:40:09 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-07-14 22:11:49 +0000 |
commit | db95c62e5f0d057f49109b4f931244cc4c11c58a (patch) | |
tree | 098e3269455247cf0522ba300334b455d2331165 | |
parent | 0ca9fa9cca6a410c7f50dab6caa8356b930345fc (diff) | |
download | chrome-ec-db95c62e5f0d057f49109b4f931244cc4c11c58a.tar.gz |
Guybrush: Sleep the battery fuel gauge before hibernating
Before we go into hibernate, try to put the battery fuel gauge into
sleep mode. Note we must be in a low current state for the gauge to
actually enter this mode.
BRANCH=None
BUG=b:186774653
TEST=on guybrush, observe power reduction in Z5
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Ie02aa3ede1b3a89592bdd5cd8e701887db3c2d9f
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2967039
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
-rw-r--r-- | baseboard/guybrush/baseboard.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/baseboard/guybrush/baseboard.c b/baseboard/guybrush/baseboard.c index ea69ac875c..51754b0dc6 100644 --- a/baseboard/guybrush/baseboard.c +++ b/baseboard/guybrush/baseboard.c @@ -893,6 +893,10 @@ void board_hibernate(void) /* Give PD task and PPC chip time to get to 5V */ msleep(SAFE_RESET_VBUS_DELAY_MS); } + + /* Try to put our battery fuel gauge into sleep mode */ + if (battery_sleep_fuel_gauge() != EC_SUCCESS) + cprints(CC_SYSTEM, "Failed to send battery sleep command"); } __overridable enum ec_error_list |