mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-30 18:41:11 +00:00
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
This commit is contained in:
committed by
chrome-bot
parent
67c8adc817
commit
a3931810fe
@@ -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] = {
|
||||
|
||||
Reference in New Issue
Block a user