From e5febf9ec926bb00d00f2e81558617604eb2b455 Mon Sep 17 00:00:00 2001 From: Hyungwoo Yang Date: Thu, 28 Jan 2021 10:13:14 -0800 Subject: Zephyr: Add LID_ANGLE_UPDATE support Add Lig Angle Update supports which is used to manage peripheral devices based on the measured lid angle. BUG=b:173507858 BRANCH=none TEST=make buildall -j8 build volteer on zephyr Change-Id: I02a467293dec459a8c8ae330059688059b2336ac Signed-off-by: Hyungwoo Yang Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2657436 Reviewed-by: Jack Rosenthal Reviewed-by: Keith Short --- zephyr/Kconfig.motionsense | 20 ++++++++++++++++---- 1 file changed, 16 insertions(+), 4 deletions(-) (limited to 'zephyr/Kconfig.motionsense') diff --git a/zephyr/Kconfig.motionsense b/zephyr/Kconfig.motionsense index 04903b361b..cade198d39 100644 --- a/zephyr/Kconfig.motionsense +++ b/zephyr/Kconfig.motionsense @@ -97,21 +97,32 @@ config PLATFORM_EC_DYNAMIC_MOTION_SENSOR_COUNT Enable this to allow changing motion sensor count dynamically. config PLATFORM_EC_LID_ANGLE - bool "Lid Angle Sensor" + bool "Lid Angle" help Enable this to detect lid angle with two accelerometers. The andgle calculation requires the information about which sensor is on the lid - and which one is on the base. The calculated lid angle is used to - decide start/stop other peripherals like stop/start keyboard scanning. + and which one is on the base. The measured lid angle can be used for + tablet mode detection(refer "Tablet Mode below") and enabling/disabling + peripheral devices(refer "Lid Angle Update" below). # TODO(b/173507858): add more detail after .dts change if PLATFORM_EC_LID_ANGLE +config PLATFORM_EC_LID_ANGLE_UPDATE + bool "Lid Angle Update" + help + Enable this to allow using the lid angle measurement to determine if + peripheral devices should be enabled or disabled, like key scanning, + trackpad interrupt. + config PLATFORM_EC_TABLET_MODE bool "Tablet Mode" help Enable this for a device which can be a tablet as well as a clamshell. - Tablet mode detection is done with current lid angle. + Tablet mode detection is done either by using the lid angle measurement + or by the dedicated GMR sensor. + +if PLATFORM_EC_TABLET_MODE config PLATFORM_EC_GMR_TABLET_MODE bool "Giant Magnetoresistance(GMR) Tablet Mode" @@ -121,6 +132,7 @@ config PLATFORM_EC_GMR_TABLET_MODE the sensor and direct its mapping to gmr_tablet_switch_isr in common/tablet_mode.c. +endif # PLATFORM_EC_TABLET_MODE endif # PLATFORM_EC_LID_ANGLE rsource "Kconfig.sensor_devices" -- cgit v1.2.1