diff options
author | nickchen <nickchen@ami.corp-partner.google.com> | 2018-06-26 17:23:29 +0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2018-06-27 10:31:32 -0700 |
commit | 833e678b7a7060a8db1efd45a86b932ff613f0ce (patch) | |
tree | a01e33a9560e3bff3992bacb4b98806e5664cbd0 /board | |
parent | 37d60de1a495b9b6c674c1e4d8a01fc783f9b2c1 (diff) | |
download | chrome-ec-833e678b7a7060a8db1efd45a86b932ff613f0ce.tar.gz |
phaser: Add volume buttons.
Add feature of volume up and down for phaser.
BUG=b:110013537
BRANCH=none
TEST= Press volume buttons, verified by OEM.
Change-Id: I4668281b163823a62fc39802f15245cd6e5b6b12
Signed-off-by: nickchen <nickchen@ami.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/1114660
Commit-Ready: Nick Chen <nickchen@ami.corp-partner.google.com>
Tested-by: Nick Chen <nickchen@ami.corp-partner.google.com>
Tested-by: Xiong Huang <xiong.huang@bitland.corp-partner.google.com>
Reviewed-by: Chao Ding <chao.ding@bitland.corp-partner.google.com>
Reviewed-by: Jett Rink <jettrink@chromium.org>
Diffstat (limited to 'board')
-rw-r--r-- | board/phaser/board.c | 1 | ||||
-rw-r--r-- | board/phaser/board.h | 4 | ||||
-rw-r--r-- | board/phaser/gpio.inc | 2 |
3 files changed, 7 insertions, 0 deletions
diff --git a/board/phaser/board.c b/board/phaser/board.c index 6c6d3fbc45..d4a5fb00ae 100644 --- a/board/phaser/board.c +++ b/board/phaser/board.c @@ -7,6 +7,7 @@ #include "adc.h" #include "adc_chip.h" +#include "button.h" #include "charge_state.h" #include "common.h" #include "console.h" diff --git a/board/phaser/board.h b/board/phaser/board.h index 52ebeca133..4c5a41059a 100644 --- a/board/phaser/board.h +++ b/board/phaser/board.h @@ -13,6 +13,10 @@ #define VARIANT_OCTOPUS_CHARGER_ISL9238 #include "baseboard.h" +#define CONFIG_VOLUME_BUTTONS +#define GPIO_VOLUME_UP_L GPIO_EC_VOLUP_BTN_ODL +#define GPIO_VOLUME_DOWN_L GPIO_EC_VOLDN_BTN_ODL + /* Optional features */ #define CONFIG_SYSTEM_UNLOCKED /* Allow dangerous commands while in dev. */ diff --git a/board/phaser/gpio.inc b/board/phaser/gpio.inc index 6580256649..295fa5866a 100644 --- a/board/phaser/gpio.inc +++ b/board/phaser/gpio.inc @@ -14,6 +14,8 @@ GPIO_INT(LID_OPEN, PIN(D, 2), GPIO_INT_BOTH | GPIO_INT(POWER_BUTTON_L, PIN(0, 1), GPIO_INT_BOTH, power_button_interrupt) /* MECH_PWR_BTN_ODL */ GPIO_INT(AC_PRESENT, PIN(0, 0), GPIO_INT_BOTH | GPIO_HIB_WAKE_HIGH, extpower_interrupt) /* ACOK_OD */ +GPIO_INT(EC_VOLUP_BTN_ODL, PIN(7, 5), GPIO_INT_BOTH | GPIO_PULL_UP, button_interrupt) +GPIO_INT(EC_VOLDN_BTN_ODL, PIN(4, 0), GPIO_INT_BOTH | GPIO_PULL_UP, button_interrupt) /* USB-C interrupts */ GPIO_INT(USB_C0_MUX_INT_ODL, PIN(6, 1), GPIO_INT_FALLING, tcpc_alert_event) |