diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2021-09-17 23:15:44 -0700 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-09-23 02:17:50 +0000 |
commit | 7537986533dec6db5d903dde935a566f14b6035a (patch) | |
tree | 8e9f620b36e889eb6d7bf4f78efa69580ad0dea8 /board/brya | |
parent | 584a379e741fa03875422045fab4bf730acccd9e (diff) | |
download | chrome-ec-7537986533dec6db5d903dde935a566f14b6035a.tar.gz |
board: Do not enable gyroscope by default
Enable gyroscope only when the AP needs it. It is not used by the EC.
For lid calculation, set frequency at 10HZ, the drivers will calculate
higher frequencies when needed.
Modify other boards as well:
Use
awk '/\.type = MOTIONSENSE_TYPE_GYRO,/ { check_config=1 } \
/\.config = / { if (check_config) { print FILENAME,$0 } } \
/\.type = MOTIONSENSE_TYPE_[^G]/ { check_config=0 }' board/*/sensors.c | \
cut -d ' ' -f 1' to locate the impacted files (board.c as well).
BUG=none
BRANCH=none
TEST=Check rotation is still working on brya
Change-Id: I45d82d00c30e35541df80d1b7805f8302b3d98ff
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3170174
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'board/brya')
-rw-r--r-- | board/brya/sensors.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/board/brya/sensors.c b/board/brya/sensors.c index efe65f4f53..57d70471ba 100644 --- a/board/brya/sensors.c +++ b/board/brya/sensors.c @@ -142,7 +142,7 @@ struct motion_sensor_t motion_sensors[] = { .config = { /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { - .odr = 12500 | ROUND_UP_FLAG, + .odr = 10000 | ROUND_UP_FLAG, }, /* Sensor on for lid angle detection */ [SENSOR_CONFIG_EC_S3] = { @@ -199,16 +199,6 @@ struct motion_sensor_t motion_sensors[] = { .rot_standard_ref = &base_standard_ref, .min_frequency = LSM6DSO_ODR_MIN_VAL, .max_frequency = LSM6DSO_ODR_MAX_VAL, - .config = { - [SENSOR_CONFIG_EC_S0] = { - .odr = 13000 | ROUND_UP_FLAG, - .ec_rate = 100 * MSEC, - }, - [SENSOR_CONFIG_EC_S3] = { - .odr = 10000 | ROUND_UP_FLAG, - .ec_rate = 100 * MSEC, - }, - }, }, [CLEAR_ALS] = { |