summaryrefslogtreecommitdiff
path: root/board/helios
diff options
context:
space:
mode:
authorChing-Kang Yen <chingkang@chromium.org>2020-04-16 23:57:17 +0800
committerChing-Kang Yen <chingkang@chromium.org>2020-04-23 13:43:16 +0000
commit557dafbacbc61cd4c5dec9f27ead4ea17b67aac6 (patch)
tree1b4e36d70a7c426371dc173a58f751012cd3977d /board/helios
parent86be30f5c4220112c6303c176f12096151285515 (diff)
downloadchrome-ec-557dafbacbc61cd4c5dec9f27ead4ea17b67aac6.tar.gz
driver: Replace BMI160 to BMI in board config
Replace some macro of BMI160 to BMI version for common function of BMI series. Make board config include the accelgyro_bmi_common.h instead of accel_gyro_bmi160.h. BRANCH=None BUG=b:146144827 TEST=make buildall -j Change-Id: I043ff8a92f15295ead3fa5c1e292319e2b4fa21a Signed-off-by: Ching-Kang Yen <chingkang@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2156525 Reviewed-by: Gwendal Grignou <gwendal@chromium.org>
Diffstat (limited to 'board/helios')
-rw-r--r--board/helios/board.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/board/helios/board.c b/board/helios/board.c
index 7ab13d5734..ac7bfb1d7e 100644
--- a/board/helios/board.c
+++ b/board/helios/board.c
@@ -11,7 +11,7 @@
#include "common.h"
#include "cros_board_info.h"
#include "driver/accel_bma2x2.h"
-#include "driver/accelgyro_bmi160.h"
+#include "driver/accelgyro_bmi_common.h"
#include "driver/als_opt3001.h"
#include "driver/bc12/pi3usb9201.h"
#include "driver/ppc/sn5s330.h"
@@ -199,7 +199,7 @@ static struct mutex g_base_mutex;
static struct mutex g_lid_mutex;
/* Base accel private data */
-static struct bmi160_drv_data_t g_bmi160_data;
+static struct bmi_drv_data_t g_bmi160_data;
/* BMA255 private data */
static struct accelgyro_saved_data_t g_bma255_data;
@@ -257,8 +257,8 @@ struct motion_sensor_t motion_sensors[] = {
.port = I2C_PORT_ACCEL,
.i2c_spi_addr_flags = BMI160_ADDR0_FLAGS,
.rot_standard_ref = &base_standard_ref,
- .min_frequency = BMI160_ACCEL_MIN_FREQ,
- .max_frequency = BMI160_ACCEL_MAX_FREQ,
+ .min_frequency = BMI_ACCEL_MIN_FREQ,
+ .max_frequency = BMI_ACCEL_MAX_FREQ,
.default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */
.config = {
[SENSOR_CONFIG_EC_S0] = {
@@ -284,8 +284,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,
+ .min_frequency = BMI_GYRO_MIN_FREQ,
+ .max_frequency = BMI_GYRO_MAX_FREQ,
},
};
unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors);