diff options
-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" |