diff options
author | Josh Tsai <josh_tsai@compal.corp-partner.google.com> | 2021-11-09 08:54:50 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-11-09 03:58:21 +0000 |
commit | 2a41bfec6c3006603c2ae2b23da9a055e5ea9784 (patch) | |
tree | 008a72ac19a6f326df7da5af859da6773b76a475 | |
parent | f0842e3615cb3ed09799558f2f27c32991e7a279 (diff) | |
download | chrome-ec-2a41bfec6c3006603c2ae2b23da9a055e5ea9784.tar.gz |
Felwinter: Initialize the vivaldi keyboard
Initialize vivaldi keyboard.
BUG=b:201340852
BRANCH=main
TEST=make BOARD=felwinter, keypad and top row functions are workable
Signed-off-by: Josh Tsai <josh_tsai@compal.corp-partner.google.com>
Change-Id: I013f2e2d8862fe78581727d1e894b7ece8c14660
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3268028
Reviewed-by: Ko Ko <ko_ko@compal.corp-partner.google.com>
Reviewed-by: Elmo Lan <elmo_lan@compal.corp-partner.google.com>
Reviewed-by: caveh jalali <caveh@chromium.org>
Commit-Queue: caveh jalali <caveh@chromium.org>
-rw-r--r-- | board/felwinter/board.h | 2 | ||||
-rw-r--r-- | board/felwinter/keyboard.c | 27 |
2 files changed, 27 insertions, 2 deletions
diff --git a/board/felwinter/board.h b/board/felwinter/board.h index 211d11b6fd..8f7c03dfb7 100644 --- a/board/felwinter/board.h +++ b/board/felwinter/board.h @@ -184,6 +184,8 @@ #define CONFIG_CHARGER_SENSE_RESISTOR 10 #define CONFIG_CHARGER_SENSE_RESISTOR_AC 10 +#define CONFIG_KEYBOARD_REFRESH_ROW3 + #ifndef __ASSEMBLER__ #include "gpio_signal.h" /* needed by registers.h */ diff --git a/board/felwinter/keyboard.c b/board/felwinter/keyboard.c index a9f033130d..c74a2bc58d 100644 --- a/board/felwinter/keyboard.c +++ b/board/felwinter/keyboard.c @@ -4,7 +4,7 @@ */ #include "common.h" - +#include "ec_commands.h" #include "keyboard_scan.h" #include "timer.h" @@ -20,6 +20,29 @@ __override struct keyboard_scan_config keyscan_config = { .poll_timeout_us = 100 * MSEC, .actual_key_mask = { 0x14, 0xff, 0xff, 0xff, 0xff, 0xf5, 0xff, - 0xa4, 0xff, 0xfe, 0x55, 0xfa, 0xca /* full set */ + 0xa4, 0xff, 0xfe, 0x55, 0xfe, 0xff, 0xff, 0xff, /* full set */ }, }; + +static const struct ec_response_keybd_config felwinter_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 | KEYBD_CAP_NUMERIC_KEYPAD, +}; + +__override const struct ec_response_keybd_config +*board_vivaldi_keybd_config(void) +{ + return &felwinter_kb; +} |