summaryrefslogtreecommitdiff
path: root/board/dewatt
diff options
context:
space:
mode:
authorGwendal Grignou <gwendal@chromium.org>2021-09-20 22:44:18 -0700
committerCommit Bot <commit-bot@chromium.org>2021-09-23 03:17:59 +0000
commitfd8c1e4ee56b721975a5ac7b76e75a088b0c861d (patch)
treee78e18b4d0dae0bc46c2a04dd5452158cc19ae1d /board/dewatt
parent62ce4fb60fb0c0bf390d296f85e4ed347cc4272a (diff)
downloadchrome-ec-fd8c1e4ee56b721975a5ac7b76e75a088b0c861d.tar.gz
board/guybrush-dewat: Minor cleanup
Remove g_bmi323 static variable, use same structure as bmi160. Fill motion_sensors array with index in order. BUG=b:195264765 BRANCH=none TEST=compile Change-Id: I2c16fa64db7786bf5ff977cd6626c3d9de9b66b4 Signed-off-by: Gwendal Grignou <gwendal@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3172268 Reviewed-by: Rob Barnes <robbarnes@google.com> Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'board/dewatt')
-rw-r--r--board/dewatt/board.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/board/dewatt/board.c b/board/dewatt/board.c
index 72e803d100..53180d39cb 100644
--- a/board/dewatt/board.c
+++ b/board/dewatt/board.c
@@ -41,8 +41,7 @@ static struct mutex g_lid_mutex;
static struct mutex g_base_mutex;
/* Motion sensor private data */
-static struct bmi_drv_data_t g_bmi160_data;
-static struct bmi3xx_drv_data g_bmi323_data;
+static struct bmi_drv_data_t g_bmi_data;
static struct accelgyro_saved_data_t g_bma422_data;
/* Matrix to rotate accelrator into standard reference frame */
@@ -84,7 +83,7 @@ struct motion_sensor_t motion_sensors[] = {
.location = MOTIONSENSE_LOC_BASE,
.drv = &bmi3xx_drv,
.mutex = &g_base_mutex,
- .drv_data = &g_bmi323_data,
+ .drv_data = &g_bmi_data,
.port = I2C_PORT_SENSOR,
.i2c_spi_addr_flags = BMI3_ADDR_I2C_PRIM,
.rot_standard_ref = &base_standard_ref,
@@ -140,7 +139,7 @@ struct motion_sensor_t motion_sensors[] = {
.location = MOTIONSENSE_LOC_BASE,
.drv = &bmi3xx_drv,
.mutex = &g_base_mutex,
- .drv_data = &g_bmi323_data,
+ .drv_data = &g_bmi_data,
.port = I2C_PORT_SENSOR,
.i2c_spi_addr_flags = BMI3_ADDR_I2C_PRIM,
.default_range = 1000, /* dps */
@@ -159,7 +158,7 @@ struct motion_sensor_t bmi160_base_accel = {
.location = MOTIONSENSE_LOC_BASE,
.drv = &bmi160_drv,
.mutex = &g_base_mutex,
- .drv_data = &g_bmi160_data,
+ .drv_data = &g_bmi_data,
.port = I2C_PORT_SENSOR,
.i2c_spi_addr_flags = BMI160_ADDR0_FLAGS,
.rot_standard_ref = &base_standard_ref,
@@ -188,7 +187,7 @@ struct motion_sensor_t bmi160_base_gyro = {
.location = MOTIONSENSE_LOC_BASE,
.drv = &bmi160_drv,
.mutex = &g_base_mutex,
- .drv_data = &g_bmi160_data,
+ .drv_data = &g_bmi_data,
.port = I2C_PORT_SENSOR,
.i2c_spi_addr_flags = BMI160_ADDR0_FLAGS,
.default_range = 1000, /* dps */