summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Huang <david.huang@quanta.corp-partner.google.com>2021-10-27 09:02:17 +0800
committerCommit Bot <commit-bot@chromium.org>2021-10-29 06:29:12 +0000
commit60f591e7bef0400c28c3b653efa53cc1016dcca1 (patch)
tree662aa0cec8d5f6e8ace66cdce14e9a805219a094
parent3f50a1e35e093d3989dc27f340b4ce5fb7fca5ee (diff)
downloadchrome-ec-60f591e7bef0400c28c3b653efa53cc1016dcca1.tar.gz
kano: Initialize the vivaldi keyboard.
Initialize the vivaldi keyboard. BUG=b:200692807 BRANCH=main TEST=manual 1. Scan all key. 2. Check action key function. 3. Check ALT + Volup + H. 4. Check ALT + Volup + R. 5. Check Refresh (F2) + powerbutton (EC reboot). 6. Check ESC + Refresh + powerbutton. Signed-off-by: David Huang <david.huang@quanta.corp-partner.google.com> Change-Id: I8b373bce021de2ef0f4a3b2d146f28d6b6be846f Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3244681 Reviewed-by: Boris Mittelberg <bmbm@google.com> Commit-Queue: Boris Mittelberg <bmbm@google.com>
-rw-r--r--board/kano/board.h5
-rw-r--r--board/kano/keyboard.c23
2 files changed, 28 insertions, 0 deletions
diff --git a/board/kano/board.h b/board/kano/board.h
index 1101b68d9a..c0524ace9b 100644
--- a/board/kano/board.h
+++ b/board/kano/board.h
@@ -58,6 +58,11 @@
#define CONFIG_CMD_ACCELS
#define CONFIG_CMD_ACCEL_INFO
+/* Keyboard */
+#define CONFIG_KEYBOARD_VIVALDI
+#define CONFIG_KEYBOARD_REFRESH_ROW3
+
+
/* USB Type A Features */
#define USB_PORT_COUNT 1
#define CONFIG_USB_PORT_POWER_DUMB
diff --git a/board/kano/keyboard.c b/board/kano/keyboard.c
index a9f033130d..38e96620e2 100644
--- a/board/kano/keyboard.c
+++ b/board/kano/keyboard.c
@@ -5,6 +5,7 @@
#include "common.h"
+#include "ec_commands.h"
#include "keyboard_scan.h"
#include "timer.h"
@@ -23,3 +24,25 @@ __override struct keyboard_scan_config keyscan_config = {
0xa4, 0xff, 0xfe, 0x55, 0xfa, 0xca /* full set */
},
};
+
+static const struct ec_response_keybd_config kano_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 &kano_kb;
+}