diff options
author | Jack Rosenthal <jrosenth@chromium.org> | 2021-03-17 18:39:23 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-03-20 00:07:30 +0000 |
commit | 7badef3bb2620762b119d9d8662aaf0a19c55778 (patch) | |
tree | 2c6978e3ce5876af34314b32df82e595d94f96a5 /board/rainier | |
parent | 4d1058bf105fb8c424ae1c9d55cd365ba61c9d7a (diff) | |
download | chrome-ec-7badef3bb2620762b119d9d8662aaf0a19c55778.tar.gz |
charge_state: provide stub definition of charge_want_shutdown
Common power sequencing code (e.g., sc7180 power sequencing) calls
charge_want_shutdown() to check there is enough battery.
If the charger hasn't been enabled, the power sequencing code is
expected to never call charge_want_shutdown (this has already been
implemented for intel x86, for example). However, there's a bunch of
ARM power sequencing code which does not guard the calls, and adding a
bunch of ifdefs or IS_ENABLED to them would look bad.
Provide a stub definition which indicates the charger never wants a
shutdown if there's no charging enabled.
BUG=b:183054226
BRANCH=none
TEST=compile sc7180 without charger
Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I1429be4262c005752be49668aeb7274e540d8342
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2774361
Reviewed-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'board/rainier')
-rw-r--r-- | board/rainier/board.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/board/rainier/board.c b/board/rainier/board.c index bf718fc425..1a95addd9d 100644 --- a/board/rainier/board.c +++ b/board/rainier/board.c @@ -439,15 +439,6 @@ int board_allow_i2c_passthru(int port) return 0; } -int charge_want_shutdown(void) -{ - /* - * power/rk3399.c assumes there is internal power. Therefore this stub - * returns false to prevent arbitrary shutdown. - */ - return 0; -} - int charge_prevent_power_on(int power_button_pressed) { /* Assume there is always sufficient power from charger to power on. */ |