From 9c488952251502b5f56e4b2d5181a332a27f8639 Mon Sep 17 00:00:00 2001 From: Daisuke Nojiri Date: Thu, 20 Apr 2017 17:44:38 -0700 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/486944 --- board/rowan/board.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'board/rowan') 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 */ -- cgit v1.2.1