diff options
author | Ben Chen <ben.chen2@quanta.corp-partner.google.com> | 2021-01-11 18:10:44 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-01-26 07:35:39 +0000 |
commit | e10667e305702d6ce6ca4fdcd380458fbc3456a5 (patch) | |
tree | 8f393bbc05aac840a9d000df81d5b54819c1d677 /board/voxel/board.c | |
parent | 061ca8397644553bb34fea1174e1a49c89bced40 (diff) | |
download | chrome-ec-e10667e305702d6ce6ca4fdcd380458fbc3456a5.tar.gz |
voxel: Enable CONFIG_KEYBOARD_VIVALDI
This CL implements vivald function row config for voxel keyboard.
BUG=b:177043612
BRANCH=main
TEST=verify keycode is correct in `evtest`
Change-Id: I02d59bf1ec9fac802f0b47f38bba1cd3915573b8
Signed-off-by: Ben Chen <ben.chen2@quanta.corp-partner.google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2620732
Reviewed-by: Keith Short <keithshort@chromium.org>
Reviewed-by: YH Lin <yueherngl@chromium.org>
Diffstat (limited to 'board/voxel/board.c')
-rw-r--r-- | board/voxel/board.c | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/board/voxel/board.c b/board/voxel/board.c index da0a5dbb40..bba00ead94 100644 --- a/board/voxel/board.c +++ b/board/voxel/board.c @@ -47,6 +47,49 @@ #define CPRINTS(format, args...) cprints(CC_CHIPSET, format, ## args) +static const struct ec_response_keybd_config zbu_new_kb = { + .num_top_row_keys = 10, + .action_keys = { + TK_BACK, + TK_REFRESH, + TK_FULLSCREEN, + TK_OVERVIEW, + TK_SNAPSHOT, + TK_BRIGHTNESS_DOWN, + TK_BRIGHTNESS_UP, + TK_VOL_MUTE, + TK_VOL_DOWN, + TK_VOL_UP, + }, + .capabilities = KEYBD_CAP_SCRNLOCK_KEY, +}; + +static const struct ec_response_keybd_config zbu_old_kb = { + .num_top_row_keys = 10, + .action_keys = { + TK_BACK, /* T1 */ + TK_FORWARD, /* T2 */ + TK_REFRESH, /* T3 */ + TK_FULLSCREEN, /* T4 */ + TK_OVERVIEW, /* 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) +{ + if (get_board_id() > 2) + return &zbu_new_kb; + else + return &zbu_old_kb; +} + /* Keyboard scan setting */ struct keyboard_scan_config keyscan_config = { /* Increase from 50 us, because KSO_02 passes through the H1. */ |