diff options
author | Diana Z <dzigterman@chromium.org> | 2021-07-01 14:36:37 -0600 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-07-02 01:27:57 +0000 |
commit | 2ad2c6829f6fe11943f4c0e80eab1300512f2c4d (patch) | |
tree | 2b3e7a2a77f744b84a3a5a44c1e8d8755d47f11b /power | |
parent | 9684fadcc059f4644dd5932acf125e94d9f0e55e (diff) | |
download | chrome-ec-2ad2c6829f6fe11943f4c0e80eab1300512f2c4d.tar.gz |
AMD: Ignore forced shutdown if transitioning
Ignore new forced shutdown requests if we're in the process of
transitioning to off already. Otherwise, the power button press may
turn the system back on again.
BRANCH=None
BUG=b:192463842
TEST=on guybrush, run the battery down to 2% in S0 and observe that
we can successfully enter G3 even when additional
chipset_force_shutdown() commands come through during the transition
Signed-off-by: Diana Z <dzigterman@chromium.org>
Change-Id: Ie2c83db939fe1cc8b3258903e209cba6394027fb
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3000849
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-by: Rob Barnes <robbarnes@google.com>
Commit-Queue: Rob Barnes <robbarnes@google.com>
Diffstat (limited to 'power')
-rw-r--r-- | power/amd_x86.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/power/amd_x86.c b/power/amd_x86.c index 5436c6c9e1..c1b7b2d853 100644 --- a/power/amd_x86.c +++ b/power/amd_x86.c @@ -34,7 +34,7 @@ void chipset_force_shutdown(enum chipset_shutdown_reason reason) { CPRINTS("%s()", __func__); - if (!chipset_in_state(CHIPSET_STATE_ANY_OFF)) { + if (!chipset_in_or_transitioning_to_state(CHIPSET_STATE_ANY_OFF)) { forcing_shutdown = 1; power_button_pch_press(); report_ap_reset(reason); |