From 8fc99fe9d0c8ac7aa2e4483a002b84df767bf64f Mon Sep 17 00:00:00 2001 From: Scott Chao Date: Fri, 8 May 2020 14:54:09 +0800 Subject: damu: modify lid accel to LIS2DWL BUG=b:147689571 BRANCH=kukui TEST=make -j BOARD=damu TEST=make buildall Signed-off-by: Scott Chao Change-Id: I2e05202e062a16c9f746a13608c3d31d90148481 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2190099 Reviewed-by: Ting Shen --- board/damu/board.c | 16 ++++++++-------- board/damu/board.h | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'board/damu') diff --git a/board/damu/board.c b/board/damu/board.c index 71f2a7da1f..919af5e11e 100644 --- a/board/damu/board.c +++ b/board/damu/board.c @@ -14,7 +14,7 @@ #include "chipset.h" #include "common.h" #include "console.h" -#include "driver/accel_lis2dh.h" +#include "driver/accel_lis2dw12.h" #include "driver/accelgyro_bmi_common.h" #include "driver/battery/max17055.h" #include "driver/bc12/pi3usb9201.h" @@ -350,7 +350,7 @@ static const mat33_fp_t lid_standard_ref = { /* sensor private data */ /* Lid accel private data */ -static struct stprivate_data g_lis2dh_data; +static struct stprivate_data g_lis2dwl_data; /* Base accel private data */ static struct bmi_drv_data_t g_bmi160_data; @@ -358,18 +358,18 @@ struct motion_sensor_t motion_sensors[] = { [LID_ACCEL] = { .name = "Lid Accel", .active_mask = SENSOR_ACTIVE_S0_S3, - .chip = MOTIONSENSE_CHIP_LIS2DE, + .chip = MOTIONSENSE_CHIP_LIS2DWL, .type = MOTIONSENSE_TYPE_ACCEL, .location = MOTIONSENSE_LOC_LID, - .drv = &lis2dh_drv, + .drv = &lis2dw12_drv, .mutex = &g_lid_mutex, - .drv_data = &g_lis2dh_data, + .drv_data = &g_lis2dwl_data, .port = I2C_PORT_SENSORS, - .i2c_spi_addr_flags = LIS2DH_ADDR1_FLAGS, + .i2c_spi_addr_flags = LIS2DWL_ADDR1_FLAGS, .rot_standard_ref = &lid_standard_ref, .default_range = 2, /* g */ - .min_frequency = LIS2DH_ODR_MIN_VAL, - .max_frequency = LIS2DH_ODR_MAX_VAL, + .min_frequency = LIS2DW12_ODR_MIN_VAL, + .max_frequency = LIS2DW12_ODR_MAX_VAL, .config = { /* EC use accel for angle detection */ [SENSOR_CONFIG_EC_S0] = { diff --git a/board/damu/board.h b/board/damu/board.h index 34df532383..df867a17ad 100644 --- a/board/damu/board.h +++ b/board/damu/board.h @@ -55,7 +55,7 @@ /* Motion Sensors */ #ifndef VARIANT_KUKUI_NO_SENSORS -#define CONFIG_ACCEL_LIS2DE /* Lid accel */ +#define CONFIG_ACCEL_LIS2DWL /* Lid accel */ #define CONFIG_ACCELGYRO_BMI160 /* Base accel */ #define CONFIG_ACCEL_INTERRUPTS #define CONFIG_ACCELGYRO_BMI160_INT_EVENT \ -- cgit v1.2.1