diff options
-rw-r--r-- | zephyr/CMakeLists.txt | 2 | ||||
-rw-r--r-- | zephyr/Kconfig.keyboard | 8 | ||||
-rw-r--r-- | zephyr/shim/include/config_chip.h | 5 |
3 files changed, 15 insertions, 0 deletions
diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt index 660b59da20..e59945002c 100644 --- a/zephyr/CMakeLists.txt +++ b/zephyr/CMakeLists.txt @@ -236,6 +236,8 @@ zephyr_sources_ifdef(CONFIG_PLATFORM_EC_KEYBOARD zephyr_sources_ifdef(CONFIG_PLATFORM_EC_KEYBOARD_PROTOCOL_8042 "${PLATFORM_EC}/common/keyboard_8042.c" "${PLATFORM_EC}/common/keyboard_8042_sharedlib.c") +zephyr_sources_ifdef(CONFIG_PLATFORM_EC_KEYBOARD_PROTOCOL_MKBP + "${PLATFORM_EC}/common/keyboard_mkbp.c") zephyr_sources_ifdef(CONFIG_PLATFORM_EC_KEYBOARD_VIVALDI "${PLATFORM_EC}/common/keyboard_vivaldi.c") zephyr_sources_ifdef(CONFIG_PLATFORM_EC_PWM_KBLIGHT diff --git a/zephyr/Kconfig.keyboard b/zephyr/Kconfig.keyboard index bacc43f4dc..e2360e262f 100644 --- a/zephyr/Kconfig.keyboard +++ b/zephyr/Kconfig.keyboard @@ -38,6 +38,14 @@ config PLATFORM_EC_KEYBOARD_PROTOCOL_8042 See here for docs: https://wiki.osdev.org/%228042%22_PS/2_Controller +config PLATFORM_EC_KEYBOARD_PROTOCOL_MKBP + bool "mkbp" + help + Use the MKBP protocol to communicate with the AP. This protocol is + usually used on ARM-based platforms. It sends the raw scan code, like + (row, col), to the AP and the kernel driver will map this scan code to + a key. + endchoice # PLATFORM_EC_KEYBOARD config PLATFORM_EC_KEYBOARD_BOARD_CONFIG diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h index 72eb343ef0..66fc7d5596 100644 --- a/zephyr/shim/include/config_chip.h +++ b/zephyr/shim/include/config_chip.h @@ -381,6 +381,11 @@ enum battery_type { #define CONFIG_KEYBOARD_PROTOCOL_8042 #endif /* CONFIG_PLATFORM_EC_KEYBOARD_PROTOCOL_8042 */ +#undef CONFIG_KEYBOARD_PROTOCOL_MKBP +#ifdef CONFIG_PLATFORM_EC_KEYBOARD_PROTOCOL_MKBP +#define CONFIG_KEYBOARD_PROTOCOL_MKBP +#endif + #undef CONFIG_CMD_KEYBOARD #ifdef CONFIG_PLATFORM_EC_CONSOLE_CMD_KEYBOARD_8042 #define CONFIG_CMD_KEYBOARD |