aboutsummaryrefslogtreecommitdiff
path: root/drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c
diff options
context:
space:
mode:
authorTrevor Gamblin <tgamblin@baylibre.com>2024-06-17 09:50:07 -0400
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2024-06-25 21:04:47 +0100
commit0e59dc9e6bfb6bf5fb978400d43b86cd95c0affd (patch)
treebe7ffe4b284d704d7a6b9284d3cc16140b74b1fc /drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c
parent513735883335a6435bf04a1c62330139496513c1 (diff)
iio: imu: inv_icm42600: make use of regmap_clear_bits(), regmap_set_bits()
Instead of using regmap_update_bits() and passing the mask twice, use regmap_set_bits(). Instead of using regmap_update_bits() and passing val = 0, use regmap_clear_bits(). Suggested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com> Acked-by: Jean-Baptiste Maneyrol <jean-baptiste.maneyrol@tdk.com> Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com> Link: https://patch.msgid.link/20240617-review-v3-27-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c')
-rw-r--r--drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c b/drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c
index 8d33504d770f..ebb31b385881 100644
--- a/drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c
+++ b/drivers/iio/imu/inv_icm42600/inv_icm42600_i2c.c
@@ -28,8 +28,8 @@ static int inv_icm42600_i2c_bus_setup(struct inv_icm42600_state *st)
INV_ICM42600_INTF_CONFIG6_MASK,
INV_ICM42600_INTF_CONFIG6_I3C_EN);
- ret = regmap_update_bits(st->map, INV_ICM42600_REG_INTF_CONFIG4,
- INV_ICM42600_INTF_CONFIG4_I3C_BUS_ONLY, 0);
+ ret = regmap_clear_bits(st->map, INV_ICM42600_REG_INTF_CONFIG4,
+ INV_ICM42600_INTF_CONFIG4_I3C_BUS_ONLY);
if (ret)
return ret;