From c0011fb7c05c528b627c2f95125f48a95a85a9d4 Mon Sep 17 00:00:00 2001 From: Wai-Hong Tam Date: Thu, 22 Oct 2020 09:40:50 -0700 Subject: Lazor: Enable g-sensors in S3 for lid angle detection The mode change (tablet vs laptop mode) is a wake source from S3. Changing the lid angle triggers the mode change. Both the lid and the base g-sensors should be active in S3 for lid angle detection. BRANCH=None BUG=b:155853349 TEST=Made the device in S3, checked the reported lid angle by rotating the device and fliping the lid. Change-Id: I6351df11fc328476428f3aaa6cf9222fc2ffc391 Signed-off-by: Wai-Hong Tam Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2492520 Reviewed-by: Stephen Boyd --- board/lazor/board.c | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/board/lazor/board.c b/board/lazor/board.c index 366c1acfc6..e4792f2783 100644 --- a/board/lazor/board.c +++ b/board/lazor/board.c @@ -335,9 +335,14 @@ struct motion_sensor_t motion_sensors[] = { .min_frequency = BMI_ACCEL_MIN_FREQ, .max_frequency = BMI_ACCEL_MAX_FREQ, .config = { - [SENSOR_CONFIG_EC_S0] = { - .odr = 10000 | ROUND_UP_FLAG, - }, + /* EC use accel for angle detection */ + [SENSOR_CONFIG_EC_S0] = { + .odr = 10000 | ROUND_UP_FLAG, + }, + /* Sensor on for lid angle detection */ + [SENSOR_CONFIG_EC_S3] = { + .odr = 10000 | ROUND_UP_FLAG, + }, }, }, [BASE_GYRO] = { -- cgit v1.2.1