diff options
author | Keith Short <keithshort@chromium.org> | 2019-12-10 14:00:48 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2019-12-11 00:38:06 +0000 |
commit | 1bc84117d8047b73cc73041eff79d5a0965ee40c (patch) | |
tree | 04f32eac9b55d5d9e3c7523d20279357502f6ed4 | |
parent | 027d873c06cff577fd2e3d7c909969992ccbc30d (diff) | |
download | chrome-ec-1bc84117d8047b73cc73041eff79d5a0965ee40c.tar.gz |
volteer: add support for volume up/down buttons
BUG=b:145959769
BRANCH=none
TEST=make buildall
TEST=press volume up/down buttons. Verify press/release events on EC
console, verify volume control shown on ChromeOS login screen.
Change-Id: I6f32de10275f2e2d78b508109a4676344215811c
Signed-off-by: Keith Short <keithshort@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1960917
Reviewed-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Reviewed-by: Daisuke Nojiri <dnojiri@chromium.org>
-rw-r--r-- | baseboard/volteer/baseboard.h | 1 | ||||
-rw-r--r-- | board/volteer/board.c | 1 | ||||
-rw-r--r-- | board/volteer/board.h | 3 | ||||
-rw-r--r-- | board/volteer/gpio.inc | 2 |
4 files changed, 6 insertions, 1 deletions
diff --git a/baseboard/volteer/baseboard.h b/baseboard/volteer/baseboard.h index 295c885590..d5ce9604c9 100644 --- a/baseboard/volteer/baseboard.h +++ b/baseboard/volteer/baseboard.h @@ -30,6 +30,7 @@ #define CONFIG_VBOOT_HASH #define CONFIG_VSTORE #define CONFIG_VSTORE_SLOT_COUNT 1 +#define CONFIG_VOLUME_BUTTONS /* Host communication */ #define CONFIG_HOSTCMD_ESPI diff --git a/board/volteer/board.c b/board/volteer/board.c index 2e95163a94..5c1755bc60 100644 --- a/board/volteer/board.c +++ b/board/volteer/board.c @@ -5,6 +5,7 @@ /* Volteer board-specific configuration */ +#include "button.h" #include "common.h" #include "extpower.h" #include "gpio.h" diff --git a/board/volteer/board.h b/board/volteer/board.h index 7f7344bf74..2bcd350ef0 100644 --- a/board/volteer/board.h +++ b/board/volteer/board.h @@ -77,7 +77,8 @@ #define GPIO_SYS_RESET_L GPIO_SYS_RST_ODL #define GPIO_WP_L GPIO_EC_WP_L #define GPIO_USB_C1_BC12_INT_ODL GPIO_USB_C1_MIX_INT_ODL - +#define GPIO_VOLUME_UP_L GPIO_EC_VOLUP_BTN_ODL +#define GPIO_VOLUME_DOWN_L GPIO_EC_VOLDN_BTN_ODL #ifndef __ASSEMBLER__ diff --git a/board/volteer/gpio.inc b/board/volteer/gpio.inc index dc008362e6..738418f250 100644 --- a/board/volteer/gpio.inc +++ b/board/volteer/gpio.inc @@ -44,6 +44,8 @@ GPIO_INT(USB_C1_MIX_INT_ODL, PIN(0, 3), GPIO_INT_BOTH, bc12_interrupt) /* HDMI interrupts */ /* Volume button interrupts */ +GPIO_INT(EC_VOLDN_BTN_ODL, PIN(9, 3), GPIO_INT_BOTH | GPIO_PULL_UP, button_interrupt) +GPIO_INT(EC_VOLUP_BTN_ODL, PIN(7, 5), GPIO_INT_BOTH | GPIO_PULL_UP, button_interrupt) /* Power Sequencing Signals */ GPIO(EN_PP3300_A, PIN(A, 3), GPIO_OUT_LOW) |