diff options
author | Scott Chao <scott.chao@bitland.corp-partner.google.com> | 2020-05-08 14:54:09 +0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2020-05-11 07:27:43 +0000 |
commit | 8fc99fe9d0c8ac7aa2e4483a002b84df767bf64f (patch) | |
tree | 8251fc84f311ae48e376dd08d3aacf30a8007d86 | |
parent | 0564d05b56c993b219707182e5b2c2306234ac7d (diff) | |
download | chrome-ec-8fc99fe9d0c8ac7aa2e4483a002b84df767bf64f.tar.gz |
damu: modify lid accel to LIS2DWL
BUG=b:147689571
BRANCH=kukui
TEST=make -j BOARD=damu
TEST=make buildall
Signed-off-by: Scott Chao <scott.chao@bitland.corp-partner.google.com>
Change-Id: I2e05202e062a16c9f746a13608c3d31d90148481
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/2190099
Reviewed-by: Ting Shen <phoenixshen@chromium.org>
-rw-r--r-- | board/damu/board.c | 16 | ||||
-rw-r--r-- | board/damu/board.h | 2 |
2 files changed, 9 insertions, 9 deletions
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 \ |