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>
This commit is contained in:
Koro Chen
2016-07-11 09:39:14 +08:00
committed by chrome-bot
parent 3f5d978bd5
commit 51b24ef232

View File

@@ -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");
}