diff options
author | Duncan Laurie <dlaurie@google.com> | 2017-05-16 07:39:10 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-05-18 18:07:29 -0700 |
commit | a082274af650d95bfc2d016b643d128e15b8cead (patch) | |
tree | a71f2bf38a5a4c5fdddf367ee16ad54f0a740e98 | |
parent | 76e064815ff5f8091fb7c127c044fa29e1d7e9c1 (diff) | |
download | chrome-ec-a082274af650d95bfc2d016b643d128e15b8cead.tar.gz |
eve: Enable mutable scancode for EVT boards
Enable the mutable scancode sets for EVT boards and reassign the
existing F13 scancode to instead send the new 0[e0 58] 1[e0 07]
scancode instead.
BUG=b:36735408
BRANCH=none
TEST=manual testing on Eve EVT to ensure that the key that used
to send F13 now sends the new scancode. Also test on P1 to ensure
that the key still sends F13.
Change-Id: Ia134db7b069d5bf10c931ee7ce66dd1ea85d3544
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://chromium-review.googlesource.com/506718
Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
-rw-r--r-- | board/eve/board.c | 10 | ||||
-rw-r--r-- | board/eve/board.h | 1 |
2 files changed, 11 insertions, 0 deletions
diff --git a/board/eve/board.c b/board/eve/board.c index b3299cb8d0..d9f99fa7aa 100644 --- a/board/eve/board.c +++ b/board/eve/board.c @@ -30,6 +30,7 @@ #include "host_command.h" #include "i2c.h" #include "keyboard_scan.h" +#include "keyboard_8042_sharedlib.h" #include "lid_angle.h" #include "lid_switch.h" #include "math_util.h" @@ -385,6 +386,15 @@ static void board_init(void) /* Provide AC status to the PCH */ gpio_set_level(GPIO_PCH_ACOK, extpower_is_present()); + +#if defined(CONFIG_KEYBOARD_SCANCODE_MUTABLE) && !defined(TEST_BUILD) + if (board_get_version() == 4) { + /* Set F13 to new defined key on EVT */ + CPRINTS("Overriding F13 scan code"); + scancode_set1[3][9] = 0xe058; + scancode_set2[3][9] = 0xe007; + } +#endif } DECLARE_HOOK(HOOK_INIT, board_init, HOOK_PRIO_DEFAULT); diff --git a/board/eve/board.h b/board/eve/board.h index 236e1f2601..a018e9f96c 100644 --- a/board/eve/board.h +++ b/board/eve/board.h @@ -72,6 +72,7 @@ #define CONFIG_KEYBOARD_BOARD_CONFIG #define CONFIG_KEYBOARD_COL2_INVERTED #define CONFIG_KEYBOARD_PROTOCOL_8042 +#define CONFIG_KEYBOARD_SCANCODE_MUTABLE #define CONFIG_TABLET_MODE /* Battery */ |