summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDawid Niedzwiecki <dn@semihalf.com>2021-05-14 13:40:20 +0200
committerCommit Bot <commit-bot@chromium.org>2021-05-18 15:18:14 +0000
commit8c9e6c4332f514d048224dd6c95e212a89d0f731 (patch)
tree5bafede893d03642fea217ad798d4c8af5dc6661
parent21f48df7afd2087eb5d0807b9cea0bf5b77bdf5a (diff)
downloadchrome-ec-8c9e6c4332f514d048224dd6c95e212a89d0f731.tar.gz
zephyr: Add Tablet Mode Switch config
Add the Tablet Mode Switch config for Zephyr. It is used by some boards to indicate the Tablet Mode state via MKBP protocol. BUG=b:188147017 BRANCH=none TEST=zmake testall Signed-off-by: Dawid Niedzwiecki <dn@semihalf.com> Change-Id: I7cba3808783679921af9041497daea4df736e202 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2897238 Reviewed-by: Keith Short <keithshort@chromium.org> Commit-Queue: Keith Short <keithshort@chromium.org>
-rw-r--r--zephyr/Kconfig.motionsense7
-rw-r--r--zephyr/shim/include/config_chip.h5
2 files changed, 12 insertions, 0 deletions
diff --git a/zephyr/Kconfig.motionsense b/zephyr/Kconfig.motionsense
index 5d93f735c2..daf2bbcdf8 100644
--- a/zephyr/Kconfig.motionsense
+++ b/zephyr/Kconfig.motionsense
@@ -124,6 +124,13 @@ config PLATFORM_EC_TABLET_MODE
if PLATFORM_EC_TABLET_MODE
+config PLATFORM_EC_TABLET_MODE_SWITCH
+ bool "Tablet Mode Switch"
+ depends on PLATFORM_EC_MKBP_INPUT_DEVICES
+ help
+ Enable a virtual switch to indicate when we are in tablet mode. The tablet
+ mode state is sent to AP via MKBP protocol(switch event).
+
config PLATFORM_EC_GMR_TABLET_MODE
bool "Giant Magnetoresistance(GMR) Tablet Mode"
help
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h
index 0b929dcbe8..8549089d26 100644
--- a/zephyr/shim/include/config_chip.h
+++ b/zephyr/shim/include/config_chip.h
@@ -1137,6 +1137,11 @@
#define CONFIG_TABLET_MODE
#endif
+#undef CONFIG_TABLET_MODE_SWITCH
+#ifdef CONFIG_PLATFORM_EC_TABLET_MODE_SWITCH
+#define CONFIG_TABLET_MODE_SWITCH
+#endif
+
#undef CONFIG_GMR_TABLET_MODE
#ifdef CONFIG_PLATFORM_EC_GMR_TABLET_MODE
#define CONFIG_GMR_TABLET_MODE