From 09105c331418e7c1ba37e69ff0494021291fb900 Mon Sep 17 00:00:00 2001 From: Deepti Deshatty Date: Wed, 7 Apr 2021 15:34:14 +0530 Subject: boldar: change lid sensor change lid sensor from BMA255 to LIS2DH12 BRANCH=none BUG=none TEST=Verified the LIS2DH12 detection on the target system. Change-Id: I014917c8eab60e1582f08dd8259efdec92ca6d91 Signed-off-by: Deepti Deshatty Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2812477 Reviewed-by: Sooraj Govindan Reviewed-by: caveh jalali --- board/boldar/board.h | 6 +++--- board/boldar/sensors.c | 18 +++++++++--------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/board/boldar/board.h b/board/boldar/board.h index 861044cbdf..96289e71b7 100644 --- a/board/boldar/board.h +++ b/board/boldar/board.h @@ -41,15 +41,15 @@ /* Keyboard features */ /* Sensors */ -/* BMA253 accelerometer in base */ -#define CONFIG_ACCEL_BMA255 +/* LIS2DH12 Lid accel */ +#define CONFIG_ACCEL_LIS2DH /* BMI260 accel/gyro in base */ #define CONFIG_ACCELGYRO_BMI260 #define CONFIG_ACCELGYRO_BMI260_INT_EVENT \ TASK_EVENT_MOTION_SENSOR_INTERRUPT(BASE_ACCEL) -/* TCS3400 ALS */ +/* TCS3400 ALS/RGB */ #define CONFIG_ALS #define ALS_COUNT 1 #define CONFIG_ALS_TCS3400 diff --git a/board/boldar/sensors.c b/board/boldar/sensors.c index 9e34812131..2bd91813ba 100644 --- a/board/boldar/sensors.c +++ b/board/boldar/sensors.c @@ -6,7 +6,7 @@ /* Volteer family-specific sensor configuration */ #include "common.h" #include "accelgyro.h" -#include "driver/accel_bma2x2.h" +#include "driver/accel_lis2dh.h" #include "driver/accelgyro_bmi_common.h" #include "driver/accelgyro_bmi260.h" #include "driver/als_tcs3400.h" @@ -23,8 +23,8 @@ static struct mutex g_lid_accel_mutex; static struct mutex g_base_mutex; -/* BMA253 private data */ -static struct accelgyro_saved_data_t g_bma253_data; +/* Lid accel private data */ +static struct stprivate_data g_lis2dh_data; /* BMI260 private data */ static struct bmi_drv_data_t g_bmi260_data; @@ -100,17 +100,17 @@ struct motion_sensor_t motion_sensors[] = { [LID_ACCEL] = { .name = "Lid Accel", .active_mask = SENSOR_ACTIVE_S0_S3, - .chip = MOTIONSENSE_CHIP_BMA255, + .chip = MOTIONSENSE_CHIP_LIS2DH, .type = MOTIONSENSE_TYPE_ACCEL, .location = MOTIONSENSE_LOC_LID, - .drv = &bma2x2_accel_drv, + .drv = &lis2dh_drv, .mutex = &g_lid_accel_mutex, - .drv_data = &g_bma253_data, + .drv_data = &g_lis2dh_data, .port = I2C_PORT_SENSOR, - .i2c_spi_addr_flags = BMA2x2_I2C_ADDR1_FLAGS, + .i2c_spi_addr_flags = LIS2DH_ADDR0_FLAGS, .rot_standard_ref = &lid_standard_ref, - .min_frequency = BMA255_ACCEL_MIN_FREQ, - .max_frequency = BMA255_ACCEL_MAX_FREQ, + .min_frequency = LIS2DH_ODR_MIN_VAL, + .max_frequency = LIS2DH_ODR_MAX_VAL, .default_range = 2, /* g, to support tablet mode */ .config = { /* EC use accel for angle detection */ -- cgit v1.2.1