summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYu-An Chen <yu-an.chen@quanta.corp-partner.google.com>2021-06-24 18:26:32 +0800
committerCommit Bot <commit-bot@chromium.org>2021-07-02 16:17:58 +0000
commit864cb264880a0c3af7370b01e08e8eab3c56c702 (patch)
tree4550651cdd4f607d93fa7706c22163e00b7bb200
parent3bb10dd59fa68b2b5a3e0d4e560bda9bef4efcd8 (diff)
downloadchrome-ec-864cb264880a0c3af7370b01e08e8eab3c56c702.tar.gz
Chronicler: Initialize the vivaldi keyboard
Initialize the vivaldi keyboard BUG=b:191129391 BRANCH=volteer TEST=Make sure that all top row keys work correctly. Signed-off-by: Yu-An Chen <yu-an.chen@quanta.corp-partner.google.com> Change-Id: I8c762a4b66649028b16b2101de5e972fb32352ad Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2984624 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
-rw-r--r--board/chronicler/board.c32
-rw-r--r--board/chronicler/board.h1
2 files changed, 33 insertions, 0 deletions
diff --git a/board/chronicler/board.c b/board/chronicler/board.c
index 2021a21726..469fa68615 100644
--- a/board/chronicler/board.c
+++ b/board/chronicler/board.c
@@ -17,6 +17,7 @@
#include "fan_chip.h"
#include "gpio.h"
#include "hooks.h"
+#include "keyboard_8042.h"
#include "lid_switch.h"
#include "power.h"
#include "power_button.h"
@@ -193,6 +194,37 @@ const struct pwm_t pwm_channels[] = {
BUILD_ASSERT(ARRAY_SIZE(pwm_channels) == PWM_CH_COUNT);
/******************************************************************************/
+/* keyboard config */
+static const struct ec_response_keybd_config main_kb = {
+ .num_top_row_keys = 10,
+ .action_keys = {
+ TK_BACK, /* T1 */
+ /*
+ * Chronicler keyboard swaps T2 and T3 in the keyboard
+ * matrix,So swap the actions key lookup to match.
+ * The physical keyboard still orders the top row as
+ * Back, Refresh, Fullscreen, etc.
+ */
+ TK_FULLSCREEN, /* T3 */
+ TK_REFRESH, /* T2 */
+ 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 &main_kb;
+}
+
+/******************************************************************************/
/* keyboard factory test */
#ifdef CONFIG_KEYBOARD_FACTORY_TEST
/*
diff --git a/board/chronicler/board.h b/board/chronicler/board.h
index 110360a75f..20670bd6e9 100644
--- a/board/chronicler/board.h
+++ b/board/chronicler/board.h
@@ -86,6 +86,7 @@
/* Keyboard feature */
#define CONFIG_KEYBOARD_FACTORY_TEST
+#define CONFIG_KEYBOARD_REFRESH_ROW3
/*
* Macros for GPIO signals used in common code that don't match the