diff options
author | Wai-Hong Tam <waihong@google.com> | 2020-10-22 09:40:50 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-10-23 21:33:52 +0000 |
commit | c0011fb7c05c528b627c2f95125f48a95a85a9d4 (patch) | |
tree | 373f787872d9108e37d25a36d67b8995ff6145ef | |
parent | 3702a6b09d7778b833cc29a8383f2002bbaee94c (diff) | |
download | chrome-ec-c0011fb7c05c528b627c2f95125f48a95a85a9d4.tar.gz |
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 <waihong@google.com>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2492520
Reviewed-by: Stephen Boyd <swboyd@chromium.org>
-rw-r--r-- | board/lazor/board.c | 11 |
1 files 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] = { |