diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2017-04-21 16:13:24 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-05-18 18:08:01 -0700 |
commit | 30f6c60bcb851620d14c4871f16e85c3fe769056 (patch) | |
tree | 33c4244c92fdb942be2c1ab61894219d39a48f9c | |
parent | 432f3f46869b011addeca306d8469d8a033088dd (diff) | |
download | chrome-ec-30f6c60bcb851620d14c4871f16e85c3fe769056.tar.gz |
power_button: Allow PB to be idle at power-on
This change adds CONFIG_POWER_BUTTON_INIT_IDLE. When it's set,
the system starts with the power button state idle. It means
when the board boots from power-off, it stays at G3.
BUG=b:37536389
BRANCH=none
TEST=Power on Fizz. Verify it stays at G3. Verify it boots
by pressing power button.
Change-Id: I09a62a69d9f201b2dc261838cc9b4425fe3a8dc1
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/486945
Reviewed-by: Duncan Laurie <dlaurie@google.com>
-rw-r--r-- | board/fizz/board.h | 1 | ||||
-rw-r--r-- | common/power_button_x86.c | 2 | ||||
-rw-r--r-- | include/config.h | 3 |
3 files changed, 5 insertions, 1 deletions
diff --git a/board/fizz/board.h b/board/fizz/board.h index 0848f35b89..ffa5bb2e58 100644 --- a/board/fizz/board.h +++ b/board/fizz/board.h @@ -70,6 +70,7 @@ #define CONFIG_EXTPOWER_DEBOUNCE_MS 1000 #define CONFIG_POWER_BUTTON #define CONFIG_POWER_BUTTON_X86 +#define CONFIG_POWER_BUTTON_INIT_IDLE #define CONFIG_POWER_COMMON #define CONFIG_POWER_SIGNAL_INTERRUPT_STORM_DETECT_THRESHOLD 30 diff --git a/common/power_button_x86.c b/common/power_button_x86.c index 658a422463..ed8a677613 100644 --- a/common/power_button_x86.c +++ b/common/power_button_x86.c @@ -232,7 +232,7 @@ static void set_initial_pwrbtn_state(void) * All other EC reset conditions power on the main processor so * it can verify the EC. */ -#ifdef CONFIG_BRINGUP +#if defined(CONFIG_BRINGUP) || defined(CONFIG_POWER_BUTTON_INIT_IDLE) CPRINTS("PB idle"); pwrbtn_state = PWRBTN_STATE_IDLE; #else diff --git a/include/config.h b/include/config.h index c48ffbc5d1..cafc5363fb 100644 --- a/include/config.h +++ b/include/config.h @@ -1782,6 +1782,9 @@ /* Support sending the power button signal to x86 chipsets */ #undef CONFIG_POWER_BUTTON_X86 +/* Set power button state idle at init */ +#undef CONFIG_POWER_BUTTON_INIT_IDLE + /* Compile common code for AP power state machine */ #undef CONFIG_POWER_COMMON |