summaryrefslogtreecommitdiff
path: root/board/coral
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2019-12-08 00:28:48 -0800
committerJustin TerAvest <teravest@chromium.org>2019-12-09 02:50:24 +0000
commit6f96b488deffa19f7fc0075ed586410c32f3a379 (patch)
treec5ac66a14d9e19bb9ddfea15678de192ca4e9e79 /board/coral
parentfb1d26a58e5511d70f747e8b943096c22dead07c (diff)
downloadchrome-ec-6f96b488deffa19f7fc0075ed586410c32f3a379.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>
Diffstat (limited to 'board/coral')
-rw-r--r--board/coral/board.c6
1 files changed, 6 insertions, 0 deletions
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);