diff options
author | Raymond Chou <raymond_chou@compal.corp-partner.google.com> | 2018-07-20 17:56:29 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-07-24 04:11:25 -0700 |
commit | 95a30548abfebfaac38e621ac124dc2197ded6fc (patch) | |
tree | 625f545d22e049e767845c1791ba8fe0f562cff0 /board/fleex | |
parent | c9ec30107f861318a531a55f23687b01c84c8a5b (diff) | |
download | chrome-ec-95a30548abfebfaac38e621ac124dc2197ded6fc.tar.gz |
Fleex: Enable volume control function
Add define EC_VOLUP_BTN and EC_VOLDN_BTN
in gpio.inc and enable CONFIG_VOLUME_BUTTONS
function in board.h
BUG=b:111670874
BRANCH=none
TEST=Verify volume control bar can be pop
up and down.
Change-Id: I0ef527b0023238c080c130ad86f98b88b03cfec2
Signed-off-by: Raymond Chou <raymond_chou@compal.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/1145149
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Diffstat (limited to 'board/fleex')
-rw-r--r-- | board/fleex/board.c | 1 | ||||
-rw-r--r-- | board/fleex/board.h | 5 | ||||
-rw-r--r-- | board/fleex/gpio.inc | 4 |
3 files changed, 10 insertions, 0 deletions
diff --git a/board/fleex/board.c b/board/fleex/board.c index d4887f9e83..000537a97d 100644 --- a/board/fleex/board.c +++ b/board/fleex/board.c @@ -8,6 +8,7 @@ #include "adc.h" #include "adc_chip.h" #include "battery.h" +#include "button.h" #include "charge_manager.h" #include "charge_state.h" #include "common.h" diff --git a/board/fleex/board.h b/board/fleex/board.h index ad8e288c5f..0a95ca9e84 100644 --- a/board/fleex/board.h +++ b/board/fleex/board.h @@ -26,6 +26,11 @@ /* Sensors without hardware FIFO are in forced mode */ #define CONFIG_ACCEL_FORCE_MODE_MASK (1 << LID_ACCEL) +/* Volume button */ +#define CONFIG_VOLUME_BUTTONS +#define GPIO_VOLUME_UP_L GPIO_EC_VOLUP_BTN_ODL +#define GPIO_VOLUME_DOWN_L GPIO_EC_VOLDN_BTN_ODL + #define CONFIG_LID_ANGLE #define CONFIG_LID_ANGLE_UPDATE #define CONFIG_LID_ANGLE_SENSOR_BASE BASE_ACCEL diff --git a/board/fleex/gpio.inc b/board/fleex/gpio.inc index 2457854314..3f0f3dd423 100644 --- a/board/fleex/gpio.inc +++ b/board/fleex/gpio.inc @@ -15,6 +15,10 @@ GPIO_INT(POWER_BUTTON_L, PIN(0, 1), GPIO_INT_BOTH, power_button_interrupt) /* ME GPIO_INT(AC_PRESENT, PIN(0, 0), GPIO_INT_BOTH | GPIO_HIB_WAKE_HIGH, extpower_interrupt) /* ACOK_OD */ +/* Volume button interrupts */ +GPIO_INT(EC_VOLUP_BTN_ODL, PIN(7, 5), GPIO_INT_BOTH, button_interrupt) +GPIO_INT(EC_VOLDN_BTN_ODL, PIN(4, 0), GPIO_INT_BOTH, button_interrupt) + /* USB-C interrupts */ GPIO_INT(USB_C0_MUX_INT_ODL, PIN(6, 1), GPIO_INT_FALLING, tcpc_alert_event) GPIO_INT(USB_C1_MUX_INT_ODL, PIN(F, 5), GPIO_INT_FALLING, tcpc_alert_event) |