diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2019-12-08 00:28:48 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-10-12 15:09:52 +0000 |
commit | 621b2b8500e1439b37f05533fa58739960299e24 (patch) | |
tree | ffc771db1e4b3039d9427684b55ea3423cfa1e31 | |
parent | e5fc1d017d79511c109b0061ac47947c80235913 (diff) | |
download | chrome-ec-621b2b8500e1439b37f05533fa58739960299e24.tar.gz |
board: Set min/max frequency attributes
On some boards, min_/max_frequency attributes were not set, esp. for
kx022 acceleometers.
BUG=b:145799480
BRANCH=octopus,coral
TEST=compile
Change-Id: I6d32926541505f02f183539ca3ad9f70c1ae7a6b
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1957374
Reviewed-by: Justin TerAvest <teravest@chromium.org>
Tested-by: Justin TerAvest <teravest@chromium.org>
(cherry picked from commit 6f96b488deffa19f7fc0075ed586410c32f3a379)
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3193836
Tested-by: Rong Chang <rongchang@chromium.org>
Auto-Submit: Rong Chang <rongchang@chromium.org>
Commit-Queue: Rong Chang <rongchang@chromium.org>
-rw-r--r-- | board/ampton/board.c | 2 | ||||
-rw-r--r-- | board/bloog/board.c | 2 | ||||
-rw-r--r-- | board/bobba/board.c | 2 | ||||
-rw-r--r-- | board/coral/board.c | 6 | ||||
-rw-r--r-- | board/dood/board.c | 2 | ||||
-rw-r--r-- | board/garg/board.c | 2 | ||||
-rw-r--r-- | board/meep/board.c | 2 | ||||
-rw-r--r-- | board/nucleo-f411re/board.c | 6 | ||||
-rw-r--r-- | board/yorp/board.c | 2 |
9 files changed, 24 insertions, 2 deletions
diff --git a/board/ampton/board.c b/board/ampton/board.c index 0025ae2567..588a1d5e58 100644 --- a/board/ampton/board.c +++ b/board/ampton/board.c @@ -191,6 +191,8 @@ struct motion_sensor_t motion_sensors[] = { .i2c_spi_addr_flags = KX022_ADDR1_FLAGS, .rot_standard_ref = &lid_standard_ref, .default_range = 4, /* g */ + .min_frequency = KX022_ACCEL_MIN_FREQ, + .max_frequency = KX022_ACCEL_MAX_FREQ, .config = { /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { diff --git a/board/bloog/board.c b/board/bloog/board.c index 42049d0ef7..a17db4288c 100644 --- a/board/bloog/board.c +++ b/board/bloog/board.c @@ -141,6 +141,8 @@ struct motion_sensor_t motion_sensors[] = { .i2c_spi_addr_flags = KX022_ADDR1_FLAGS, .rot_standard_ref = &lid_standrd_ref, .default_range = 2, /* g */ + .min_frequency = KX022_ACCEL_MIN_FREQ, + .max_frequency = KX022_ACCEL_MAX_FREQ, .config = { /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { diff --git a/board/bobba/board.c b/board/bobba/board.c index 61503cce4d..9bbedbcb07 100644 --- a/board/bobba/board.c +++ b/board/bobba/board.c @@ -171,6 +171,8 @@ struct motion_sensor_t motion_sensors[] = { .i2c_spi_addr_flags = KX022_ADDR1_FLAGS, .rot_standard_ref = NULL, /* Identity matrix. */ .default_range = 4, /* g */ + .min_frequency = KX022_ACCEL_MIN_FREQ, + .max_frequency = KX022_ACCEL_MAX_FREQ, .config = { /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { diff --git a/board/coral/board.c b/board/coral/board.c index 91df786a1a..5e359c4051 100644 --- a/board/coral/board.c +++ b/board/coral/board.c @@ -726,6 +726,8 @@ struct motion_sensor_t motion_sensors[] = { .i2c_spi_addr_flags = KX022_ADDR1_FLAGS, .rot_standard_ref = NULL, /* Identity matrix. */ .default_range = 2, /* g, enough for laptop. */ + .min_frequency = KX022_ACCEL_MIN_FREQ, + .max_frequency = KX022_ACCEL_MAX_FREQ, .config = { /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { @@ -751,6 +753,8 @@ struct motion_sensor_t motion_sensors[] = { .i2c_spi_addr_flags = BMI160_ADDR0_FLAGS, .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 = { /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { @@ -778,6 +782,8 @@ struct motion_sensor_t motion_sensors[] = { .i2c_spi_addr_flags = BMI160_ADDR0_FLAGS, .default_range = 1000, /* dps */ .rot_standard_ref = &base_standard_ref, + .min_frequency = BMI160_GYRO_MIN_FREQ, + .max_frequency = BMI160_GYRO_MAX_FREQ, }, }; unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors); diff --git a/board/dood/board.c b/board/dood/board.c index b246b83e1d..5c64fc60b5 100644 --- a/board/dood/board.c +++ b/board/dood/board.c @@ -154,6 +154,8 @@ struct motion_sensor_t motion_sensors[] = { .i2c_spi_addr_flags = KX022_ADDR1_FLAGS, .rot_standard_ref = NULL, /* Identity matrix. */ .default_range = 4, /* g */ + .min_frequency = KX022_ACCEL_MIN_FREQ, + .max_frequency = KX022_ACCEL_MAX_FREQ, .config = { /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { diff --git a/board/garg/board.c b/board/garg/board.c index 8da97ef1c8..66c065700d 100644 --- a/board/garg/board.c +++ b/board/garg/board.c @@ -149,6 +149,8 @@ struct motion_sensor_t motion_sensors[] = { .i2c_spi_addr_flags = KX022_ADDR1_FLAGS, .rot_standard_ref = NULL, /* Identity matrix. */ .default_range = 4, /* g */ + .min_frequency = KX022_ACCEL_MIN_FREQ, + .max_frequency = KX022_ACCEL_MAX_FREQ, .config = { /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { diff --git a/board/meep/board.c b/board/meep/board.c index 200909dca0..6029a77ab7 100644 --- a/board/meep/board.c +++ b/board/meep/board.c @@ -141,6 +141,8 @@ struct motion_sensor_t motion_sensors[] = { .i2c_spi_addr_flags = KX022_ADDR1_FLAGS, .rot_standard_ref = &lid_standrd_ref, .default_range = 2, /* g */ + .min_frequency = KX022_ACCEL_MIN_FREQ, + .max_frequency = KX022_ACCEL_MAX_FREQ, .config = { /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { diff --git a/board/nucleo-f411re/board.c b/board/nucleo-f411re/board.c index adaed9e3de..d5a4a67a40 100644 --- a/board/nucleo-f411re/board.c +++ b/board/nucleo-f411re/board.c @@ -76,8 +76,9 @@ struct motion_sensor_t motion_sensors[] = { .drv_data = &g_bmi160_data, .port = I2C_PORT_ACCEL, .i2c_spi_addr_flags = BMI160_ADDR0_FLAGS, - .rot_standard_ref = NULL, .default_range = 2, /* g, enough for laptop. */ + .min_frequency = BMI160_ACCEL_MIN_FREQ, + .max_frequency = BMI160_ACCEL_MAX_FREQ, .config = { /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { @@ -104,7 +105,8 @@ struct motion_sensor_t motion_sensors[] = { .port = I2C_PORT_ACCEL, .i2c_spi_addr_flags = BMI160_ADDR0_FLAGS, .default_range = 1000, /* dps */ - .rot_standard_ref = NULL, + .min_frequency = BMI160_GYRO_MIN_FREQ, + .max_frequency = BMI160_GYRO_MAX_FREQ, }, }; const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors); diff --git a/board/yorp/board.c b/board/yorp/board.c index 89dee7fb41..fefebe3f07 100644 --- a/board/yorp/board.c +++ b/board/yorp/board.c @@ -122,6 +122,8 @@ struct motion_sensor_t motion_sensors[] = { .i2c_spi_addr_flags = KX022_ADDR1_FLAGS, .rot_standard_ref = NULL, /* Identity matrix. */ .default_range = 4, /* g */ + .min_frequency = KX022_ACCEL_MIN_FREQ, + .max_frequency = KX022_ACCEL_MAX_FREQ, .config = { /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { |