summaryrefslogtreecommitdiff
path: root/driver
diff options
context:
space:
mode:
Diffstat (limited to 'driver')
-rw-r--r--driver/accel_lis2ds.c8
-rw-r--r--driver/accel_lis2dw12.c3
-rw-r--r--driver/accelgyro_icm426xx.c9
3 files changed, 5 insertions, 15 deletions
diff --git a/driver/accel_lis2ds.c b/driver/accel_lis2ds.c
index 93272262ad..ad1a7e0e36 100644
--- a/driver/accel_lis2ds.c
+++ b/driver/accel_lis2ds.c
@@ -89,12 +89,8 @@ __maybe_unused static int lis2ds_config_interrupt(const struct motion_sensor_t *
int ret = EC_SUCCESS;
/* Interrupt trigger level of power-on-reset is HIGH */
- if (!(s->flags & MOTIONSENSE_FLAG_INT_ACTIVE_HIGH)) {
- ret = st_write_data_with_mask(s, LIS2DS_H_ACTIVE_ADDR,
- LIS2DS_H_ACTIVE_MASK, LIS2DS_EN_BIT);
- if (ret != EC_SUCCESS)
- return ret;
- }
+ RETURN_ERROR(st_write_data_with_mask(s, LIS2DS_H_ACTIVE_ADDR,
+ LIS2DS_H_ACTIVE_MASK, LIS2DS_EN_BIT));
if (IS_ENABLED(CONFIG_ACCEL_FIFO)) {
/*
diff --git a/driver/accel_lis2dw12.c b/driver/accel_lis2dw12.c
index b9dd4bf053..f8e9c305cb 100644
--- a/driver/accel_lis2dw12.c
+++ b/driver/accel_lis2dw12.c
@@ -516,8 +516,7 @@ static int init(struct motion_sensor_t *s)
goto err_unlock;
/* Interrupt trigger level of power-on-reset is HIGH */
- if (IS_ENABLED(LIS2DW12_ENABLE_FIFO) &&
- !(MOTIONSENSE_FLAG_INT_ACTIVE_HIGH & s->flags)) {
+ if (IS_ENABLED(LIS2DW12_ENABLE_FIFO)) {
ret = st_write_data_with_mask(s, LIS2DW12_H_ACTIVE_ADDR,
LIS2DW12_H_ACTIVE_MASK,
LIS2DW12_EN_BIT);
diff --git a/driver/accelgyro_icm426xx.c b/driver/accelgyro_icm426xx.c
index 68d45c4a6a..6f916b5559 100644
--- a/driver/accelgyro_icm426xx.c
+++ b/driver/accelgyro_icm426xx.c
@@ -326,13 +326,8 @@ static int icm426xx_config_interrupt(const struct motion_sensor_t *s)
int val, ret;
/* configure INT1 pin */
- val = ICM426XX_INT1_PUSH_PULL;
- if (s->flags & MOTIONSENSE_FLAG_INT_ACTIVE_HIGH)
- val |= ICM426XX_INT1_ACTIVE_HIGH;
-
- ret = icm_write8(s, ICM426XX_REG_INT_CONFIG, val);
- if (ret != EC_SUCCESS)
- return ret;
+ RETURN_ERROR(icm_write8(s, ICM426XX_REG_INT_CONFIG,
+ ICM426XX_INT1_PUSH_PULL));
/* deassert async reset for proper INT pin operation */
ret = icm_field_update8(s, ICM426XX_REG_INT_CONFIG1,