power_button_x86: Initialize to on if button is pressed

This change sets the initial power button state to init-on
if the power button is pressed.

BUG=b:37274183
BRANCH=none
TEST=Enter recovery mode by power+recovery button press.

Change-Id: I6ed849bc303e7cdbcb975ae2a6ff278093c86088
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/486946
Reviewed-by: Duncan Laurie <dlaurie@google.com>
This commit is contained in:
Daisuke Nojiri
2017-04-21 16:24:56 -07:00
committed by chrome-bot
parent 4c9e99b5e9
commit e42da5ace4

View File

@@ -227,6 +227,9 @@ static void set_initial_pwrbtn_state(void)
*/
CPRINTS("PB init-off");
power_button_pch_release();
} else if (power_button_is_pressed()) {
CPRINTS("PB init-on");
pwrbtn_state = PWRBTN_STATE_INIT_ON;
} else {
/*
* All other EC reset conditions power on the main processor so