From 380c8f9f027f228db6996f409c994c23910e2fbf Mon Sep 17 00:00:00 2001 From: "arthur.lin" Date: Thu, 2 Sep 2021 09:49:42 +0800 Subject: gooey: Initialize the vivaldi keyboard Define vivaldi keybd for gooey. BRANCH=keeby BUG=b:198113136 TEST=make buildall -j Test the top row on gooey Test the Alt + VolUp + r combo on gooey Test the Esc + Refresh + Power combo on gooey Test all the other keys also Signed-off-by: arthur.lin Change-Id: I359db5fcc47abd94415cb66d7ffdbf9c77a346ae Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3139618 Reviewed-by: Henry Sun Reviewed-by: Aseda Aboagye Commit-Queue: Aseda Aboagye --- board/gooey/board.c | 26 ++++++++++++++++++++++++++ board/gooey/board.h | 3 +++ 2 files changed, 29 insertions(+) (limited to 'board') diff --git a/board/gooey/board.c b/board/gooey/board.c index 748dea0737..518e159f9d 100644 --- a/board/gooey/board.c +++ b/board/gooey/board.c @@ -22,6 +22,7 @@ #include "hooks.h" #include "intc.h" #include "keyboard_scan.h" +#include "keyboard_8042.h" #include "lid_switch.h" #include "power.h" #include "power_button.h" @@ -491,3 +492,28 @@ __override void lid_angle_peripheral_enable(int enable) keyboard_scan_enable(0, KB_SCAN_DISABLE_LID_ANGLE); } } + +static const struct ec_response_keybd_config gooey_keybd = { + /* Default Chromeos keyboard config */ + .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 */ + }, + /* No function keys, no numeric keypad, has screenlock key */ + .capabilities = KEYBD_CAP_SCRNLOCK_KEY, +}; + +__override const struct ec_response_keybd_config +*board_vivaldi_keybd_config(void) +{ + return &gooey_keybd; +} diff --git a/board/gooey/board.h b/board/gooey/board.h index 65adbce47d..bf7f36c0b9 100644 --- a/board/gooey/board.h +++ b/board/gooey/board.h @@ -93,6 +93,9 @@ #define USB_PORT_COUNT 1 #define CONFIG_USB_PORT_POWER_DUMB +/* Keyboard features */ +#define CONFIG_KEYBOARD_VIVALDI + #ifndef __ASSEMBLER__ #include "gpio_signal.h" -- cgit v1.2.1