diff options
author | tony.tang <tony.tang@lcfc.corp-partner.google.com> | 2022-01-18 14:07:59 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2022-01-19 06:37:36 +0000 |
commit | c836b762e935c9a531a8ff2059489d9a92c79242 (patch) | |
tree | fec915ae910728191995005265f6d79a9da6bf6b | |
parent | d9b72ef2de1c4f080eceb0fc6db5b33b3b597ab7 (diff) | |
download | chrome-ec-c836b762e935c9a531a8ff2059489d9a92c79242.tar.gz |
taniks: De-feature volume up/down button on IO board in EC code
Taniks does not have volume up and volume down button in IO board, and we will need to remove the EC code.
BRANCH=brya
BUG=b:215033684
TEST=make buildall -j
Signed-off-by: tony.tang <tony.tang@lcfc.corp-partner.google.com>
Change-Id: Id1b819236880e3bcc5b6627951c1628f1d41b4e8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3397555
Reviewed-by: caveh jalali <caveh@chromium.org>
-rw-r--r-- | board/taniks/board.c | 16 | ||||
-rw-r--r-- | board/taniks/board.h | 3 |
2 files changed, 18 insertions, 1 deletions
diff --git a/board/taniks/board.c b/board/taniks/board.c index 80be70ca27..7715185a1c 100644 --- a/board/taniks/board.c +++ b/board/taniks/board.c @@ -50,6 +50,22 @@ __override void board_cbi_init(void) config_usb_db_type(); } +void board_init(void) +{ + + if (ec_cfg_has_tabletmode()) { + + } else { + /* only clamshell todo */ + gpio_set_flags(GPIO_EC_VOLUP_BTN_ODL, GPIO_INPUT | GPIO_PULL_DOWN); + gpio_set_flags(GPIO_EC_VOLDN_BTN_ODL, GPIO_INPUT | GPIO_PULL_DOWN); + button_disable_gpio(BUTTON_VOLUME_UP); + button_disable_gpio(BUTTON_VOLUME_DOWN); + } +} +DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT); + + /* Called on AP S3 -> S0 transition */ static void board_chipset_resume(void) { diff --git a/board/taniks/board.h b/board/taniks/board.h index 189e222b44..9e55e0194f 100644 --- a/board/taniks/board.h +++ b/board/taniks/board.h @@ -4,6 +4,7 @@ */ /* Taniks board configuration */ +#define CONFIG_BUTTONS_RUNTIME_CONFIG #ifndef __CROS_EC_BOARD_H #define __CROS_EC_BOARD_H @@ -14,7 +15,7 @@ * Taniks boards are set up for vivaldi */ #define CONFIG_KEYBOARD_VIVALDI - +#undef CONFIG_VOLUME_BUTTONS /* Baseboard features */ #include "baseboard.h" |