diff options
author | Daisuke Nojiri <dnojiri@chromium.org> | 2017-04-20 17:44:38 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-05-09 23:20:08 -0700 |
commit | 9c488952251502b5f56e4b2d5181a332a27f8639 (patch) | |
tree | 5c382faeddba47af0f9b0039c3918e85ae92c4f0 /board | |
parent | e8982ea3cd66941e518b829a37834a534e71b3bc (diff) | |
download | chrome-ec-9c488952251502b5f56e4b2d5181a332a27f8639.tar.gz |
button: Allow board to define recovery buttons
This patch declares recovery_buttons array, where each board
lists recovery buttons. Pressing those while the board reboots
makes the system enter recovery mode.
BUG=none
BRANCH=none
TEST=buildall
Change-Id: I1f204156efbd6d2a507d67ba90f75ce857b03559
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/486944
Diffstat (limited to 'board')
-rw-r--r-- | board/fizz/board.h | 1 | ||||
-rw-r--r-- | board/poppy/board.c | 6 | ||||
-rw-r--r-- | board/rowan/board.c | 6 |
3 files changed, 12 insertions, 1 deletions
diff --git a/board/fizz/board.h b/board/fizz/board.h index b6135b681b..450dac3b90 100644 --- a/board/fizz/board.h +++ b/board/fizz/board.h @@ -18,7 +18,6 @@ #define CONFIG_ADC #define CONFIG_BOARD_VERSION #define CONFIG_BUTTON_COUNT 2 -#define CONFIG_BUTTON_RECOVERY #define CONFIG_CASE_CLOSED_DEBUG_EXTERNAL #define CONFIG_DPTF #define CONFIG_FLASH_SIZE 0x80000 diff --git a/board/poppy/board.c b/board/poppy/board.c index 09478521d4..510f0b8489 100644 --- a/board/poppy/board.c +++ b/board/poppy/board.c @@ -466,6 +466,12 @@ const struct button_config buttons[CONFIG_BUTTON_COUNT] = { GPIO_VOLUME_UP_L, 30 * MSEC, 0}, }; +const struct button_config *recovery_buttons[] = { + &buttons[BUTTON_VOLUME_DOWN], + &buttons[BUTTON_VOLUME_UP], +}; +const int recovery_buttons_count = ARRAY_SIZE(recovery_buttons); + static void board_pmic_init(void) { if (system_jumped_to_this_image()) diff --git a/board/rowan/board.c b/board/rowan/board.c index 340e3b36bf..4a63261b10 100644 --- a/board/rowan/board.c +++ b/board/rowan/board.c @@ -163,6 +163,12 @@ const struct button_config buttons[CONFIG_BUTTON_COUNT] = { GPIO_VOLUME_UP_L, 30 * MSEC, 0}, }; +const struct button_config *recovery_buttons[] = { + &buttons[BUTTON_VOLUME_DOWN], + &buttons[BUTTON_VOLUME_UP], +}; +const int recovery_buttons_count = ARRAY_SIZE(recovery_buttons); + struct usb_mux usb_muxes[CONFIG_USB_PD_PORT_COUNT] = { { .port_addr = 0, /* port idx */ |