diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2021-12-09 23:44:27 -0800 |
---|---|---|
committer | Commit Bot <commit-bot@chromium.org> | 2021-12-14 17:57:41 +0000 |
commit | 6d7d95a74a27724ca0c512f0ab6ab9d5f3d80fa1 (patch) | |
tree | c7f45d60a0013879364095233b096ff42a43f599 /driver | |
parent | e5e637734eefd924f7399d9646204d2cd83b3b96 (diff) | |
download | chrome-ec-6d7d95a74a27724ca0c512f0ab6ab9d5f3d80fa1.tar.gz |
driver: remove MOTIONSENSE_FLAG_INT_ACTIVE_HIGH
This flag is not set on any board, remove.
BUG=none
TEST=compile
BRANCH="asurada chameleon dedede drallion endeavour fpmcu grunt hatch
icarus keeby kukui nocturne puff quiche servo trogdor volteer zork"
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Change-Id: I2b81e16e42aeb48e9422f4b32d8051f13194e239
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3328807
Reviewed-by: Diana Z <dzigterman@chromium.org>
Diffstat (limited to 'driver')
-rw-r--r-- | driver/accel_lis2ds.c | 8 | ||||
-rw-r--r-- | driver/accel_lis2dw12.c | 3 | ||||
-rw-r--r-- | driver/accelgyro_icm426xx.c | 9 |
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, |