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/oak/board.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'board/oak') diff --git a/board/oak/board.c b/board/oak/board.c index fcde44a0cd..05f030f89e 100644 --- a/board/oak/board.c +++ b/board/oak/board.c @@ -18,7 +18,7 @@ #include "console.h" #include "driver/accel_kionix.h" #include "driver/accel_kx022.h" -#include "driver/accelgyro_bmi160.h" +#include "driver/accelgyro_bmi_common.h" #include "driver/als_opt3001.h" #include "driver/charger/isl923x.h" #include "driver/tcpm/tcpci.h" @@ -651,7 +651,7 @@ const mat33_fp_t base_standard_ref = { #endif static struct kionix_accel_data g_kx022_data; -static struct bmi160_drv_data_t g_bmi160_data; +static struct bmi_drv_data_t g_bmi160_data; struct motion_sensor_t motion_sensors[] = { #ifdef CONFIG_ACCELGYRO_BMI160 @@ -673,8 +673,8 @@ struct motion_sensor_t motion_sensors[] = { .i2c_spi_addr_flags = SLAVE_MK_SPI_ADDR_FLAGS(0), .rot_standard_ref = &base_standard_ref, .default_range = 4, /* g, to meet CDD 7.3.1/C-1-4 reqs */ - .min_frequency = BMI160_ACCEL_MIN_FREQ, - .max_frequency = BMI160_ACCEL_MAX_FREQ, + .min_frequency = BMI_ACCEL_MIN_FREQ, + .max_frequency = BMI_ACCEL_MAX_FREQ, .config = { /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { @@ -697,8 +697,8 @@ struct motion_sensor_t motion_sensors[] = { .i2c_spi_addr_flags = SLAVE_MK_SPI_ADDR_FLAGS(0), .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, }, #endif #ifdef CONFIG_ACCEL_KX022 -- cgit v1.2.1