From 8347cde45488634cab4f60aa387a259a6dadf0b3 Mon Sep 17 00:00:00 2001 From: "jerry2.huang" Date: Mon, 28 Sep 2020 14:01:03 +0800 Subject: Lillipup: Add volume key of GPIO setting Add volume key of GPIO setting: 1.GPIO93 EC_VOLDN_MUTE_BTN_ODL 2.GPIO97 EC_VOLUP_BTN_ODL BUG=b:169530752 BRANCH=none TEST=make BOARD=lindar Signed-off-by: jerry2.huang Change-Id: Ibe5052ab8b8a95bc0a3b6d2e589f4ec929473331 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2434595 Reviewed-by: YH Lin Reviewed-by: Keith Short --- board/lindar/board.h | 6 ++---- board/lindar/gpio.inc | 6 +++--- 2 files changed, 5 insertions(+), 7 deletions(-) (limited to 'board/lindar') diff --git a/board/lindar/board.h b/board/lindar/board.h index e749275e26..151b300ff1 100644 --- a/board/lindar/board.h +++ b/board/lindar/board.h @@ -65,9 +65,6 @@ #define CONFIG_USBC_PPC_SN5S330 /* USBC port C0 */ #define CONFIG_USBC_PPC_SYV682X /* USBC port C1 */ -/* undefine button */ -#undef CONFIG_VOLUME_BUTTONS - /* BC 1.2 */ /* Volume Button feature */ @@ -103,7 +100,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_MUTE_BTN_ODL /* I2C Bus Configuration */ #define CONFIG_I2C diff --git a/board/lindar/gpio.inc b/board/lindar/gpio.inc index 4323d300e8..4c3bce9696 100644 --- a/board/lindar/gpio.inc +++ b/board/lindar/gpio.inc @@ -36,8 +36,9 @@ GPIO_INT(USB_C1_MIX_INT_ODL, PIN(0, 3), GPIO_INT_BOTH, bc12_interrupt) /* HDMI interrupts */ -/* Mute button interrupts */ -GPIO(EC_VOLDN_MUTE_BTN_ODL, PIN(9, 3), GPIO_INT_BOTH) +/* Volume button interrupts */ +GPIO_INT(EC_VOLDN_MUTE_BTN_ODL, PIN(9, 3), GPIO_INT_BOTH | GPIO_PULL_UP, button_interrupt) +GPIO_INT(EC_VOLUP_BTN_ODL, PIN(9, 7), GPIO_INT_BOTH | GPIO_PULL_UP, button_interrupt) /* HW_ID PIN */ GPIO(HW_ID, PIN(D, 4), GPIO_INPUT) @@ -155,7 +156,6 @@ ALTERNATE(PIN_MASK(0, BIT(0) | BIT(1) | BIT(2)), 0, MODULE_PMU, 0) /* GPIO00 = GPIO(UNUSED_GPIO81, PIN(8, 1), GPIO_INPUT | GPIO_PULL_UP) GPIO(UNUSED_GPIOB5, PIN(B, 5), GPIO_INPUT | GPIO_PULL_UP) GPIO(UNUSED_GPIOB4, PIN(B, 4), GPIO_INPUT | GPIO_PULL_UP) -GPIO(UNUSED_GPIO97, PIN(9, 7), GPIO_INPUT | GPIO_PULL_UP) GPIO(UNUSED_GPIO60, PIN(6, 0), GPIO_INPUT | GPIO_PULL_UP) GPIO(UNUSED_GPIO34, PIN(3, 4), GPIO_INPUT | GPIO_PULL_UP) GPIO(UNUSED_GPIO96, PIN(9, 6), GPIO_INPUT | GPIO_PULL_UP) -- cgit v1.2.1