summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2021-02-04 15:39:08 -0700
committerCommit Bot <commit-bot@chromium.org>2021-02-05 16:54:43 +0000
commit2dcfc48fee9c53d85e03051a16dcc4ce7778fe1e (patch)
tree04172a46c7f815b839fd8800ac9f60331a281996
parent6393053cee225e5679792961b74702c641ba8b06 (diff)
downloadchrome-ec-2dcfc48fee9c53d85e03051a16dcc4ce7778fe1e.tar.gz
zephyr: Support PWRBTN_ASSERTS_KSI2
Support these two options for Zephyr. BUG=b:167405015 BRANCH=none TEST=build for volteer and see that the new code is included Signed-off-by: Simon Glass <sjg@chromium.org> Change-Id: I6887de388cf9fa8f2146129aad5058bf4889ff4b Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2674952 Reviewed-by: Jack Rosenthal <jrosenth@chromium.org> Reviewed-by: Keith Short <keithshort@chromium.org>
-rw-r--r--zephyr/Kconfig.keyboard14
-rw-r--r--zephyr/shim/include/config_chip.h10
2 files changed, 24 insertions, 0 deletions
diff --git a/zephyr/Kconfig.keyboard b/zephyr/Kconfig.keyboard
index 11ff1d14ba..70358d14eb 100644
--- a/zephyr/Kconfig.keyboard
+++ b/zephyr/Kconfig.keyboard
@@ -57,6 +57,20 @@ 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_PWRBTN_ASSERTS_KSI2
+ bool "Power-button press forces KSI2 to be asserted"
+ help
+ Enable this if KSI2 is stuck 'asserted' for all scan columns if the
+ power button is held. We must be aware of this case in order to
+ correctly handle recovery mode key combinations.
+
+config PLATFORM_EC_KEYBOARD_PWRBTN_ASSERTS_KSI3
+ bool "Power-button press forces KSI3 to be asserted"
+ help
+ Enable this if KSI3 is stuck 'asserted' for all scan columns if the
+ power button is held. We must be aware of this case in order to
+ correctly handle recovery mode key combinations.
+
config PLATFORM_EC_KEYBOARD_COL2_INVERTED
bool "A mechanism for passing KSO2 to H1 which inverts the signal"
help
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h
index edbe881a24..c6c6d57ee2 100644
--- a/zephyr/shim/include/config_chip.h
+++ b/zephyr/shim/include/config_chip.h
@@ -274,6 +274,16 @@ enum battery_type {
#define CONFIG_KEYBOARD_KEYPAD
#endif
+#undef CONFIG_KEYBOARD_PWRBTN_ASSERTS_KSI2
+#ifdef CONFIG_PLATFORM_EC_KEYBOARD_PWRBTN_ASSERTS_KSI2
+#define CONFIG_KEYBOARD_PWRBTN_ASSERTS_KSI2
+#endif
+
+#undef CONFIG_KEYBOARD_PWRBTN_ASSERTS_KSI3
+#ifdef CONFIG_PLATFORM_EC_KEYBOARD_PWRBTN_ASSERTS_KSI3
+#define CONFIG_KEYBOARD_PWRBTN_ASSERTS_KSI3
+#endif
+
#undef CONFIG_PWM_KBLIGHT
#undef CONFIG_KEYBOARD_BACKLIGHT
#ifdef CONFIG_PLATFORM_EC_PWM_KBLIGHT