diff options
-rw-r--r-- | board/pirika/board.c | 44 | ||||
-rw-r--r-- | board/pirika/board.h | 2 |
2 files changed, 45 insertions, 1 deletions
diff --git a/board/pirika/board.c b/board/pirika/board.c index bc3e92cc09..8bfcbbbf0d 100644 --- a/board/pirika/board.c +++ b/board/pirika/board.c @@ -48,6 +48,50 @@ static void check_c0_line(void); DECLARE_DEFERRED(check_c0_line); +/* Use default keyboard scan config, because board didn't supply one */ +struct keyboard_scan_config keyscan_config = { + /* + * CONFIG_KEYBOARD_COL2_INVERTED is defined for passing the column 2 + * to H1 which inverts the signal. The signal passing through H1 + * adds more delay. Need a larger delay value. Otherwise, pressing + * Refresh key will also trigger T key, which is in the next scanning + * column line. See http://b/156007029. + */ + .output_settle_us = 80, + .debounce_down_us = 9 * MSEC, + .debounce_up_us = 30 * MSEC, + .scan_period_us = 3 * MSEC, + .min_post_scan_delay_us = 1000, + .poll_timeout_us = 100 * MSEC, + .actual_key_mask = { + 0x14, 0xff, 0xff, 0xff, 0xff, 0xf5, 0xff, + 0xa4, 0xff, 0xf6, 0x55, 0xfa, 0xca /* full set */ + }, +}; + +static const struct ec_response_keybd_config pirika_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 &pirika_kb; +} + static void notify_c0_chips(void) { schedule_deferred_pd_interrupt(0); diff --git a/board/pirika/board.h b/board/pirika/board.h index b4a0dbe0df..cf5185ca91 100644 --- a/board/pirika/board.h +++ b/board/pirika/board.h @@ -90,7 +90,7 @@ /* Keyboard */ #define CONFIG_KEYBOARD_VIVALDI #define CONFIG_KEYBOARD_REFRESH_ROW3 -#define CONFIG_KEYBOARD_KEYPAD +#define CONFIG_KEYBOARD_BOARD_CONFIG #ifndef __ASSEMBLER__ |