summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabio Baltieri <fabiobaltieri@google.com>2021-02-23 12:39:10 +0000
committerCommit Bot <commit-bot@chromium.org>2021-02-25 17:30:52 +0000
commit43abe58099313ed4b0f6ff8514988e540193672b (patch)
treeb30a38e33c6072aacc609a3ac82dc60893c37e8b
parentcad54c16176dbc5d94be576c9d9addd9ada695fb (diff)
downloadchrome-ec-43abe58099313ed4b0f6ff8514988e540193672b.tar.gz
zephyr: add Vivaldi keyboard support
Add support for building common/keyboard_vivaldi.c. This is enabled by default in ECOS as long as CONFIG_KEYBOARD_PROTOCOL_8042 is enabled too. BRANCH=none BUG=b:177604307 TEST=build and verified that the map is set and HC command is received Change-Id: I881cdfc0a14432a97ced27be757b4c30daf002b8 Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2712967 Reviewed-by: Keith Short <keithshort@chromium.org>
-rw-r--r--zephyr/CMakeLists.txt2
-rw-r--r--zephyr/Kconfig.keyboard13
-rw-r--r--zephyr/shim/include/config_chip.h5
3 files changed, 20 insertions, 0 deletions
diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt
index f250710c74..790443fd19 100644
--- a/zephyr/CMakeLists.txt
+++ b/zephyr/CMakeLists.txt
@@ -215,6 +215,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_VIVALDI
+ "${PLATFORM_EC}/common/keyboard_vivaldi.c")
zephyr_sources_ifdef(CONFIG_PLATFORM_EC_PWM_KBLIGHT
"${PLATFORM_EC}/common/keyboard_backlight.c"
"${PLATFORM_EC}/common/pwm_kblight.c")
diff --git a/zephyr/Kconfig.keyboard b/zephyr/Kconfig.keyboard
index 693bff0823..bacc43f4dc 100644
--- a/zephyr/Kconfig.keyboard
+++ b/zephyr/Kconfig.keyboard
@@ -57,6 +57,19 @@ config PLATFORM_EC_KEYBOARD_KEYPAD
placed on the far right. This contains nuumber keys and also some
commonly used symbols, to help speed up numeric data entry.
+config PLATFORM_EC_KEYBOARD_VIVALDI
+ bool "Vivaldi keyboard support"
+ depends on PLATFORM_EC_KEYBOARD_PROTOCOL_8042
+ default y
+ help
+ Enable code for Vivaldi keyboard (standard for new Chromium OS
+ devices). A Chromium OS device is Vivaldi compatible if the keyboard
+ matrix complies with: go/vivaldi-matrix.
+
+ Vivaldi code enables:
+ - A response to EC_CMD_GET_KEYBD_CONFIG command.
+ - Boards can specify their custom layout for top keys.
+
choice "Power button interference"
prompt "Select the impact of pressing the power button"
help
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h
index c0e01b6ea6..792a6fabcb 100644
--- a/zephyr/shim/include/config_chip.h
+++ b/zephyr/shim/include/config_chip.h
@@ -355,6 +355,11 @@ enum battery_type {
#define CONFIG_KEYBOARD_KEYPAD
#endif
+#undef CONFIG_KEYBOARD_VIVALDI
+#ifdef CONFIG_PLATFORM_EC_KEYBOARD_VIVALDI
+#define CONFIG_KEYBOARD_VIVALDI
+#endif
+
#undef CONFIG_KEYBOARD_PWRBTN_ASSERTS_KSI2
#ifdef CONFIG_PLATFORM_EC_KEYBOARD_PWRBTN_ASSERTS_KSI2
#define CONFIG_KEYBOARD_PWRBTN_ASSERTS_KSI2