summaryrefslogtreecommitdiff
path: root/power
diff options
context:
space:
mode:
authorKoro Chen <koro.chen@mediatek.com>2016-07-11 09:39:14 +0800
committerchrome-bot <chrome-bot@chromium.org>2016-07-11 08:26:00 -0700
commit51b24ef2325b04f769a41c0ee197ef93d45cc8e2 (patch)
tree3430b7cd2fc24626dbe3254b21594922a8df472e /power
parent3f5d978bd523caf5797fcfeed08a5d28e6d31d79 (diff)
downloadchrome-ec-51b24ef2325b04f769a41c0ee197ef93d45cc8e2.tar.gz
power: mediatek: Do not block power state by waiting for power button release
The firmware needs to talk to the EC while the power button is pressed. If the EC did not even leave the S5->S3 state this is not possible. Seems like the piece of code is not even necessary, check_for_power_off_event will catch the long press asynchronously later on anyway. BRANCH=none BUG=chrome-os-partner:54781 TEST=power up by power button and hold it, there should be no error logs during EC sync, and screen turns on for a short time then off Change-Id: Ic0cccb6cfc5ddd389c1111a77ec06530a9e429ef Signed-off-by: Koro Chen <koro.chen@mediatek.com> Reviewed-on: https://chromium-review.googlesource.com/359152 Reviewed-by: Rong Chang <rongchang@chromium.org>
Diffstat (limited to 'power')
-rw-r--r--power/mediatek.c15
1 files changed, 2 insertions, 13 deletions
diff --git a/power/mediatek.c b/power/mediatek.c
index 1ac5066712..6cfa4fd650 100644
--- a/power/mediatek.c
+++ b/power/mediatek.c
@@ -690,19 +690,8 @@ enum power_state power_handle_state(enum power_state state)
power_on();
if (power_wait_signals(IN_POWER_GOOD) == EC_SUCCESS) {
CPRINTS("POWER_GOOD seen");
- if (power_button_wait_for_release
- (DELAY_SHUTDOWN_ON_POWER_HOLD) == EC_SUCCESS) {
- power_button_was_pressed = 0;
- return POWER_S3;
- } else {
- CPRINTS("long-press button, shutdown");
- power_off();
- /*
- * Since the AP may be up already, return S0S3
- * state to go through the suspend hook.
- */
- return POWER_S0S3;
- }
+ power_button_was_pressed = 0;
+ return POWER_S3;
} else {
CPRINTS("POWER_GOOD not seen in time");
}