From a3931810fed99d345c54bd9db08e345459b95f07 Mon Sep 17 00:00:00 2001 From: Gwendal Grignou Date: Tue, 17 Oct 2017 09:58:28 -0700 Subject: [PATCH] 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 Reviewed-on: https://chromium-review.googlesource.com/723601 --- board/scarlet/board.c | 6 ++++++ 1 file changed, 6 insertions(+) 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] = {