summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFurquan Shaikh <furquan@chromium.org>2017-11-27 14:13:51 -0800
committerchrome-bot <chrome-bot@chromium.org>2017-11-28 17:56:29 -0800
commit4815373754754c7a4452a5081851d51042d50201 (patch)
treeabd92b8cf7a3dd5f10b982c867e32d0217a2acef
parent7e2d3cd3a6ec36e33a4a175e9343a23140b75af5 (diff)
downloadchrome-ec-4815373754754c7a4452a5081851d51042d50201.tar.gz
cannonlake: Check for hard and soft off in chipset_force_shutdown
Similar to CL:774298, intention of chipset_force_shutdown is to power off the AP by simulating power button press until it results in power button override and shuts down AP. However, if AP is already in hard or soft off conditions (i.e. G3, S5G3, G3S5 or S5) then AP is already off, and simulating power button press results in charge_prevent_power_on from incorrectly assuming that the power button is pressed by user. Thus, check if the system is in soft or hard off before shutting it down. BUG=b:65864825 BRANCH=None TEST=make -j buildall Change-Id: I4b6d798af4618cbd4179f8700ebb2aa78021207e Signed-off-by: Furquan Shaikh <furquan@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/791933 Reviewed-by: Aaron Durbin <adurbin@chromium.org>
-rw-r--r--power/cannonlake.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/power/cannonlake.c b/power/cannonlake.c
index 270eba5f35..b9181475ce 100644
--- a/power/cannonlake.c
+++ b/power/cannonlake.c
@@ -31,7 +31,7 @@ void chipset_force_shutdown(void)
* Consider reducing the latency here by changing the power off
* hold time on the PMIC.
*/
- if (!chipset_in_state(CHIPSET_STATE_HARD_OFF)) {
+ if (!chipset_in_state(CHIPSET_STATE_ANY_OFF)) {
forcing_shutdown = 1;
power_button_pch_press();
}