diff options
-rw-r--r-- | board/drobit/board.c | 40 | ||||
-rw-r--r-- | board/drobit/board.h | 2 |
2 files changed, 41 insertions, 1 deletions
diff --git a/board/drobit/board.c b/board/drobit/board.c index 722cdee8a1..7a84951465 100644 --- a/board/drobit/board.c +++ b/board/drobit/board.c @@ -54,11 +54,34 @@ struct keyboard_scan_config keyscan_config = { .min_post_scan_delay_us = 1000, .poll_timeout_us = 100 * MSEC, .actual_key_mask = { - 0x14, 0xff, 0xff, 0xff, 0xff, 0xf5, 0xff, + 0x1c, 0xfe, 0xff, 0xff, 0xff, 0xf5, 0xff, 0xa4, 0xff, 0xfe, 0x55, 0xfa, 0xca /* full set */ }, }; +static const struct ec_response_keybd_config drobit_kb = { + .num_top_row_keys = 10, + .action_keys = { + TK_BACK, /* T1 */ + TK_REFRESH, /* T2 */ + TK_FULLSCREEN, /* T3 */ + TK_OVERVIEW, /* T4 */ + TK_SNAPSHOT, /* T5 */ + TK_BRIGHTNESS_DOWN, /* T6 */ + TK_BRIGHTNESS_UP, /* T7 */ + TK_VOL_MUTE, /* T8 */ + TK_VOL_DOWN, /* T9 */ + TK_VOL_UP, /* T10 */ + }, + .capabilities = KEYBD_CAP_SCRNLOCK_KEY, +}; + +__override const struct ec_response_keybd_config +*board_vivaldi_keybd_config(void) +{ + return &drobit_kb; +} + /******************************************************************************/ /* * FW_CONFIG defaults for Volteer if the CBI data is not initialized. @@ -430,3 +453,18 @@ int ppc_get_alert_status(int port) else return gpio_get_level(GPIO_USB_C1_PPC_INT_ODL) == 0; } + +/* Called on AP S0ix -> S0 tranition */ +static void board_chipset_resume(void) +{ + gpio_set_level(GPIO_EC_KB_BL_EN, 1); +} +DECLARE_HOOK(HOOK_CHIPSET_RESUME, board_chipset_resume, HOOK_PRIO_DEFAULT); + +/* Called on AP S0 -> S0ix transition */ +static void board_chipset_suspend(void) +{ + gpio_set_level(GPIO_EC_KB_BL_EN, 0); +} +DECLARE_HOOK(HOOK_CHIPSET_SUSPEND, board_chipset_suspend, HOOK_PRIO_DEFAULT); + diff --git a/board/drobit/board.h b/board/drobit/board.h index 19866743f4..d30c42ee02 100644 --- a/board/drobit/board.h +++ b/board/drobit/board.h @@ -36,6 +36,8 @@ #define CONFIG_LED_PWM_COUNT 1 /* Keyboard features */ +#define CONFIG_KEYBOARD_VIVALDI +#define CONFIG_KEYBOARD_REFRESH_ROW3 /* Sensors */ #undef CONFIG_TABLET_MODE |