diff options
-rw-r--r-- | driver/accel_lis2dw12.c | 5 | ||||
-rw-r--r-- | driver/accel_lis2dw12.h | 3 |
2 files changed, 8 insertions, 0 deletions
diff --git a/driver/accel_lis2dw12.c b/driver/accel_lis2dw12.c index b9b4c255c2..f249f1896c 100644 --- a/driver/accel_lis2dw12.c +++ b/driver/accel_lis2dw12.c @@ -508,6 +508,11 @@ static int init(struct motion_sensor_t *s) if (ret != EC_SUCCESS) goto err_unlock; + ret = st_write_data_with_mask(s, LIS2DW12_LOW_NOISE_ADDR, + LIS2DW12_LOW_NOISE_MASK, LIS2DW12_EN_BIT); + if (ret != EC_SUCCESS) + goto err_unlock; + /* Interrupt trigger level of power-on-reset is HIGH */ if (IS_ENABLED(ACCEL_LIS2DW12_INT_ENABLE)) { ret = st_write_data_with_mask(s, LIS2DW12_H_ACTIVE_ADDR, diff --git a/driver/accel_lis2dw12.h b/driver/accel_lis2dw12.h index f0c7174123..3b014d26a5 100644 --- a/driver/accel_lis2dw12.h +++ b/driver/accel_lis2dw12.h @@ -182,6 +182,9 @@ enum lis2dw12_fs { #define LIS2DW12_ACCEL_FS_MAX_VAL 16 +#define LIS2DW12_LOW_NOISE_ADDR LIS2DW12_CTRL6_ADDR +#define LIS2DW12_LOW_NOISE_MASK 0x04 + /* Acc Gain value. */ #define LIS2DW12_FS_2G_GAIN 3904 #define LIS2DW12_FS_4G_GAIN (LIS2DW12_FS_2G_GAIN << 1) |