diff options
Diffstat (limited to 'board/bobba/board.c')
-rw-r--r-- | board/bobba/board.c | 31 |
1 files changed, 14 insertions, 17 deletions
diff --git a/board/bobba/board.c b/board/bobba/board.c index 7525cfefb8..3be6443893 100644 --- a/board/bobba/board.c +++ b/board/bobba/board.c @@ -14,7 +14,7 @@ #include "common.h" #include "cros_board_info.h" #include "driver/accel_kionix.h" -#include "driver/accelgyro_lsm6dsm.h" +#include "driver/accelgyro_bmi160.h" #include "driver/bc12/bq24392.h" #include "driver/charger/bd9995x.h" #include "driver/ppc/nx20p348x.h" @@ -117,8 +117,7 @@ const matrix_3x3_t base_standard_ref = { /* sensor private data */ static struct kionix_accel_data g_kx022_data; -static struct lsm6dsm_data lsm6dsm_g_data; -static struct lsm6dsm_data lsm6dsm_a_data; +static struct bmi160_drv_data_t g_bmi160_data; /* Drivers */ struct motion_sensor_t motion_sensors[] = { @@ -146,22 +145,21 @@ struct motion_sensor_t motion_sensors[] = { }, }, }, - [BASE_ACCEL] = { .name = "Base Accel", .active_mask = SENSOR_ACTIVE_S0_S3_S5, - .chip = MOTIONSENSE_CHIP_LSM6DSM, + .chip = MOTIONSENSE_CHIP_BMI160, .type = MOTIONSENSE_TYPE_ACCEL, .location = MOTIONSENSE_LOC_BASE, - .drv = &lsm6dsm_drv, + .drv = &bmi160_drv, .mutex = &g_base_mutex, - .drv_data = &lsm6dsm_a_data, + .drv_data = &g_bmi160_data, .port = I2C_PORT_SENSOR, - .addr = LSM6DSM_ADDR0, + .addr = BMI160_ADDR0, .rot_standard_ref = &base_standard_ref, .default_range = 4, /* g */ - .min_frequency = LSM6DSM_ODR_MIN_VAL, - .max_frequency = LSM6DSM_ODR_MAX_VAL, + .min_frequency = BMI160_ACCEL_MIN_FREQ, + .max_frequency = BMI160_ACCEL_MAX_FREQ, .config = { /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { @@ -175,22 +173,21 @@ struct motion_sensor_t motion_sensors[] = { }, }, }, - [BASE_GYRO] = { .name = "Base Gyro", .active_mask = SENSOR_ACTIVE_S0, - .chip = MOTIONSENSE_CHIP_LSM6DSM, + .chip = MOTIONSENSE_CHIP_BMI160, .type = MOTIONSENSE_TYPE_GYRO, .location = MOTIONSENSE_LOC_BASE, - .drv = &lsm6dsm_drv, + .drv = &bmi160_drv, .mutex = &g_base_mutex, - .drv_data = &lsm6dsm_g_data, + .drv_data = &g_bmi160_data, .port = I2C_PORT_SENSOR, - .addr = LSM6DSM_ADDR0, + .addr = BMI160_ADDR0, .default_range = 1000, /* dps */ .rot_standard_ref = &base_standard_ref, - .min_frequency = LSM6DSM_ODR_MIN_VAL, - .max_frequency = LSM6DSM_ODR_MAX_VAL, + .min_frequency = BMI160_GYRO_MIN_FREQ, + .max_frequency = BMI160_GYRO_MAX_FREQ, }, }; |