diff options
author | Vijay Hiremath <vijay.p.hiremath@intel.com> | 2017-09-07 16:35:55 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-09-08 15:05:14 -0700 |
commit | 1623f192e865709a1071bde37819963dd5d0e17c (patch) | |
tree | d04e9b857fb3b492144868018486007e933020f7 /board/glkrvp | |
parent | 6010e6c98ec35f87ae74d38c9c6cfdceff4a9a95 (diff) | |
download | chrome-ec-1623f192e865709a1071bde37819963dd5d0e17c.tar.gz |
GLKRVP: Enable Volume buttons
BUG=b:65461918
BRANCH=glkrvp
TEST=Volume button notification can scroll in the UI.
Change-Id: I9229e0fd0613bd672eff22e4cc087ad447d8d795
Signed-off-by: Vijay Hiremath <vijay.p.hiremath@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/656530
Commit-Ready: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Tested-by: Vijay P Hiremath <vijay.p.hiremath@intel.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'board/glkrvp')
-rw-r--r-- | board/glkrvp/board.c | 19 | ||||
-rw-r--r-- | board/glkrvp/board.h | 1 | ||||
-rw-r--r-- | board/glkrvp/gpio.inc | 5 |
3 files changed, 22 insertions, 3 deletions
diff --git a/board/glkrvp/board.c b/board/glkrvp/board.c index 7170c47d0f..1a1fcb42a3 100644 --- a/board/glkrvp/board.c +++ b/board/glkrvp/board.c @@ -5,6 +5,7 @@ /* Intel GLK-RVP board-specific configuration */ +#include "button.h" #include "chipset.h" #include "console.h" #include "extpower.h" @@ -71,6 +72,24 @@ const enum gpio_signal hibernate_wake_pins[] = { }; const int hibernate_wake_pins_used = ARRAY_SIZE(hibernate_wake_pins); +const struct button_config buttons[CONFIG_BUTTON_COUNT] = { + { + .name = "Volume Up", + .type = KEYBOARD_BUTTON_VOLUME_UP, + .gpio = GPIO_EC_VOLUP_BTN_ODL, + .debounce_us = 30 * MSEC, + .flags = 0, + }, + { + .name = "Volume Down", + .type = KEYBOARD_BUTTON_VOLUME_DOWN, + .gpio = GPIO_EC_VOLDN_BTN_ODL, + .debounce_us = 30 * MSEC, + .flags = 0, + }, +}; +BUILD_ASSERT(ARRAY_SIZE(buttons) == CONFIG_BUTTON_COUNT); + /* Called by APL power state machine when transitioning from G3 to S5 */ static void chipset_pre_init(void) { diff --git a/board/glkrvp/board.h b/board/glkrvp/board.h index 32a7b8793d..d76ca49706 100644 --- a/board/glkrvp/board.h +++ b/board/glkrvp/board.h @@ -84,6 +84,7 @@ /* EC */ #define CONFIG_BOARD_VERSION #define CONFIG_BOARD_SPECIFIC_VERSION +#define CONFIG_BUTTON_COUNT 2 #define CONFIG_WP_ALWAYS #define CONFIG_I2C #define CONFIG_I2C_MASTER diff --git a/board/glkrvp/gpio.inc b/board/glkrvp/gpio.inc index 475fa238bd..2571c57a2f 100644 --- a/board/glkrvp/gpio.inc +++ b/board/glkrvp/gpio.inc @@ -22,6 +22,8 @@ GPIO_INT(AC_PRESENT, PIN(D, 2), GPIO_INT_BOTH, extpower_interrupt) /* ACOK_OD GPIO_INT(WP_L, PIN(9, 3), GPIO_INT_BOTH | GPIO_SEL_1P8V, switch_interrupt) /* EC_WP_ODL */ GPIO_INT(USB_C0_PD_INT_ODL, PIN(6, 2), GPIO_INT_FALLING, tcpc_alert_event) GPIO_INT(USB_C1_PD_INT_ODL, PIN(6, 3), GPIO_INT_FALLING, tcpc_alert_event) +GPIO_INT(EC_VOLUP_BTN_ODL, PIN(3, 4), GPIO_INT_BOTH | GPIO_PULL_UP, button_interrupt) +GPIO_INT(EC_VOLDN_BTN_ODL, PIN(3, 7), GPIO_INT_BOTH | GPIO_PULL_UP, button_interrupt) GPIO(PCH_SMI_L, PIN(C, 6), GPIO_ODR_HIGH) /* EC_SMI_ODL */ GPIO(PCH_SCI_L, PIN(7, 6), GPIO_ODR_HIGH) /* EC_SCI_ODL */ @@ -66,9 +68,6 @@ UNIMPLEMENTED(USB_C1_5V_EN) GPIO(NC_02, PIN(0, 2), GPIO_INPUT) GPIO(NC_04, PIN(0, 4), GPIO_INPUT) -GPIO(NC_34, PIN(3, 4), GPIO_INPUT) -GPIO(NC_37, PIN(3, 7), GPIO_INPUT) - GPIO(NC_41, PIN(4, 1), GPIO_INPUT) GPIO(NC_42, PIN(4, 2), GPIO_INPUT) |