summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBen Chen <ben.chen2@quanta.corp-partner.google.com>2021-01-11 18:10:44 +0800
committerCommit Bot <commit-bot@chromium.org>2021-01-26 07:35:39 +0000
commite10667e305702d6ce6ca4fdcd380458fbc3456a5 (patch)
tree8f393bbc05aac840a9d000df81d5b54819c1d677
parent061ca8397644553bb34fea1174e1a49c89bced40 (diff)
downloadchrome-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>
-rw-r--r--board/voxel/board.c43
-rw-r--r--board/voxel/board.h6
2 files changed, 43 insertions, 6 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. */
diff --git a/board/voxel/board.h b/board/voxel/board.h
index 6478644b18..6628be18b5 100644
--- a/board/voxel/board.h
+++ b/board/voxel/board.h
@@ -45,12 +45,6 @@
#define CONFIG_LED_ONOFF_STATES
/* Keyboard features */
-/*
- * Disable VOL up/down when tablet mode.
- * TODO(b/170966461): Re-enable Vivaldi keyboard once
- * 8042 and MKBP drivers can coexist.
- */
-#undef CONFIG_KEYBOARD_VIVALDI
/* Sensors */
/* BMI160 Base accel/gyro */