summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHank Xie <hank.xie@quanta.corp-partner.google.com>2022-03-14 17:20:57 +0800
committerCommit Bot <commit-bot@chromium.org>2022-03-17 04:36:42 +0000
commitdc1bda18acfced540a94bd2b1567070f37968fe8 (patch)
tree7ce6b51cba190929e79ac81cbbf09dfc2ed53fdf
parent5e4df0a33de371076193e050d3234c5e67d66618 (diff)
downloadchrome-ec-dc1bda18acfced540a94bd2b1567070f37968fe8.tar.gz
landia: Porting keyboard.
Porting screen lock key for landia. BUG=none BRANCH=dedede TEST=make sure keyboard function of each MB works correctly. Signed-off-by: Hank Xie <hank.xie@quanta.corp-partner.google.com> Change-Id: Iee3ca1c0ad9ce519ab8e11ca218aaf1338433b1a Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3517432 Reviewed-by: Devin Lu <Devin.Lu@quantatw.com> Reviewed-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Tested-by: Tommy Chung <tommy.chung@quanta.corp-partner.google.com> Reviewed-by: Diana Z <dzigterman@chromium.org>
-rw-r--r--board/lantis/board.c23
1 files changed, 22 insertions, 1 deletions
diff --git a/board/lantis/board.c b/board/lantis/board.c
index 4e9e6badad..ce9047d2e8 100644
--- a/board/lantis/board.c
+++ b/board/lantis/board.c
@@ -398,6 +398,24 @@ static const struct ec_response_keybd_config lantis_keybd_backlight = {
/* No function keys, no numeric keypad and no screenlock key */
};
+static const struct ec_response_keybd_config landia_keybd = {
+ .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,
+ /* No function keys and no numeric keypad */
+};
+
static const struct ec_response_keybd_config landrid_keybd_backlight = {
.num_top_row_keys = 13,
.action_keys = {
@@ -449,7 +467,10 @@ __override const struct ec_response_keybd_config
else
return &landrid_keybd;
} else {
- return &lantis_keybd_backlight;
+ if (get_cbi_fw_config_tablet_mode())
+ return &landia_keybd;
+ else
+ return &lantis_keybd_backlight;
}
}