From 64d79d609bb2bd66a05bb96b2714543bed667c67 Mon Sep 17 00:00:00 2001 From: Daniel Kurtz Date: Fri, 21 Apr 2017 17:41:27 +0800 Subject: [PATCH] rowan: enable Lid Accel but not Gyro readings in S0 Allow EC to take Lid Accelerometer readings in S0 to support rotation, but disable taking Gyro readings unless requested by AP. Signed-off-by: Daniel Kurtz BRANCH=none BUG=b:36668539 TEST=in ec console: accelinfo on => confirm Lid Accel values are non-zero => confirm Gyro values are zero Change-Id: Ie0bf466a5877cf8d20fb3d5cd223696fbdc9c271 Reviewed-on: https://chromium-review.googlesource.com/484140 Commit-Ready: Daniel Kurtz Tested-by: Daniel Kurtz Reviewed-by: Gwendal Grignou --- board/rowan/board.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/board/rowan/board.c b/board/rowan/board.c index 0c5d905ae3..340e3b36bf 100644 --- a/board/rowan/board.c +++ b/board/rowan/board.c @@ -527,10 +527,10 @@ struct motion_sensor_t motion_sensors[] = { .odr = 0, .ec_rate = 0, }, - /* EC: angle detection is not used */ + /* Sensor on in S0 for Chrome screen orientation */ [SENSOR_CONFIG_EC_S0] = { - .odr = 0, - .ec_rate = 0, + .odr = 10000 | ROUND_UP_FLAG, + .ec_rate = 100 * MSEC, }, /* Sensor off in S3/S5 */ [SENSOR_CONFIG_EC_S3] = { @@ -563,10 +563,10 @@ struct motion_sensor_t motion_sensors[] = { .odr = 0, .ec_rate = 0, }, - /* Enable gyro in S0 */ + /* Sensor off in S0 by default */ [SENSOR_CONFIG_EC_S0] = { - .odr = 10000 | ROUND_UP_FLAG, - .ec_rate = 100 * MSEC, + .odr = 0, + .ec_rate = 0, }, /* Sensor off in S3/S5 */ [SENSOR_CONFIG_EC_S3] = {