From 8c9e6c4332f514d048224dd6c95e212a89d0f731 Mon Sep 17 00:00:00 2001 From: Dawid Niedzwiecki Date: Fri, 14 May 2021 13:40:20 +0200 Subject: 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 Change-Id: I7cba3808783679921af9041497daea4df736e202 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2897238 Reviewed-by: Keith Short Commit-Queue: Keith Short --- zephyr/Kconfig.motionsense | 7 +++++++ zephyr/shim/include/config_chip.h | 5 +++++ 2 files changed, 12 insertions(+) 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 -- cgit v1.2.1