From e42da5ace4393868a610a51bba89730fafd11157 Mon Sep 17 00:00:00 2001 From: Daisuke Nojiri Date: Fri, 21 Apr 2017 16:24:56 -0700 Subject: [PATCH] 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 Reviewed-on: https://chromium-review.googlesource.com/486946 Reviewed-by: Duncan Laurie --- common/power_button_x86.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/common/power_button_x86.c b/common/power_button_x86.c index ed8a677613..7fd7101c29 100644 --- a/common/power_button_x86.c +++ b/common/power_button_x86.c @@ -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