diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2017-10-17 09:58:28 -0700 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2017-10-20 14:38:47 -0700 |
commit | a3931810fed99d345c54bd9db08e345459b95f07 (patch) | |
tree | f2c16bb3fa08f456a8275323a447071f2125c45c | |
parent | 67c8adc817c1153eb32e6f1a81ebe2f7782415ef (diff) | |
download | chrome-ec-a3931810fed99d345c54bd9db08e345459b95f07.tar.gz |
scarlet: Add min/max frequencies for sensors
As part of new interface MOTIONSENSE_CMD_INFO, we need to provide
sensors min and max frequency.
BUG=none
BRANCH=none
TEST=compile
Change-Id: I8bcd4e2287a79ac17b0dce58ad7704876e89bcdb
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/723601
-rw-r--r-- | board/scarlet/board.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/board/scarlet/board.c b/board/scarlet/board.c index d83e575fec..02ec61c558 100644 --- a/board/scarlet/board.c +++ b/board/scarlet/board.c @@ -456,6 +456,8 @@ struct motion_sensor_t motion_sensors[] = { .addr = BMI160_SET_SPI_ADDRESS(CONFIG_SPI_ACCEL_PORT), .rot_standard_ref = &base_standard_ref, .default_range = 2, /* g, enough for laptop. */ + .min_frequency = BMI160_ACCEL_MIN_FREQ, + .max_frequency = BMI160_ACCEL_MAX_FREQ, .config = { /* AP: by default use EC settings */ [SENSOR_CONFIG_AP] = { @@ -492,6 +494,8 @@ struct motion_sensor_t motion_sensors[] = { .addr = BMI160_SET_SPI_ADDRESS(CONFIG_SPI_ACCEL_PORT), .default_range = 1000, /* dps */ .rot_standard_ref = NULL, /* Identity matrix. */ + .min_frequency = BMI160_GYRO_MIN_FREQ, + .max_frequency = BMI160_GYRO_MAX_FREQ, .config = { /* AP: by default shutdown all sensors */ [SENSOR_CONFIG_AP] = { @@ -526,6 +530,8 @@ struct motion_sensor_t motion_sensors[] = { .port = CONFIG_SPI_ACCEL_PORT, .addr = BMI160_SET_SPI_ADDRESS(CONFIG_SPI_ACCEL_PORT), .default_range = 1 << 18, /* 1bit = 4 Pa, 16bit ~= 2600 hPa */ + .min_frequency = BMP280_BARO_MIN_FREQ, + .max_frequency = BMP280_BARO_MAX_FREQ, .config = { /* AP: by default shutdown all sensors */ [SENSOR_CONFIG_AP] = { |