From 557dafbacbc61cd4c5dec9f27ead4ea17b67aac6 Mon Sep 17 00:00:00 2001 From: Ching-Kang Yen Date: Thu, 16 Apr 2020 23:57:17 +0800 Subject: 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 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2156525 Reviewed-by: Gwendal Grignou --- board/nautilus/board.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'board/nautilus') diff --git a/board/nautilus/board.c b/board/nautilus/board.c index 3f01a70f6c..30fc388e57 100644 --- a/board/nautilus/board.c +++ b/board/nautilus/board.c @@ -17,7 +17,7 @@ #include "charger.h" #include "chipset.h" #include "console.h" -#include "driver/accelgyro_bmi160.h" +#include "driver/accelgyro_bmi_common.h" #include "driver/accel_bma2x2.h" #include "driver/baro_bmp280.h" #include "driver/charger/isl923x.h" @@ -591,7 +591,7 @@ int board_get_version(void) static struct mutex g_lid_mutex; static struct mutex g_base_mutex; -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; @@ -648,8 +648,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 = { /* EC use accel for angle detection */ @@ -676,8 +676,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, }, }; const unsigned int motion_sensor_count = ARRAY_SIZE(motion_sensors); -- cgit v1.2.1