Commit 4ed403d8 authored by Trevor Gamblin's avatar Trevor Gamblin Committed by Jonathan Cameron

iio: accel: msa311: make use of regmap_clear_bits()

Instead of using regmap_update_bits() and passing val = 0, use
regmap_clear_bits().
Suggested-by: default avatarUwe Kleine-König <u.kleine-koenig@baylibre.com>
Signed-off-by: default avatarTrevor Gamblin <tgamblin@baylibre.com>
Acked-by: default avatarUwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20240617-review-v3-3-88d1338c4cca@baylibre.comSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 41aea490
......@@ -1034,10 +1034,10 @@ static int msa311_chip_init(struct msa311_priv *msa311)
"failed to unmap map0/map1 interrupts\n");
/* Disable all axes by default */
err = regmap_update_bits(msa311->regs, MSA311_ODR_REG,
MSA311_GENMASK(F_X_AXIS_DIS) |
MSA311_GENMASK(F_Y_AXIS_DIS) |
MSA311_GENMASK(F_Z_AXIS_DIS), 0);
err = regmap_clear_bits(msa311->regs, MSA311_ODR_REG,
MSA311_GENMASK(F_X_AXIS_DIS) |
MSA311_GENMASK(F_Y_AXIS_DIS) |
MSA311_GENMASK(F_Z_AXIS_DIS));
if (err)
return dev_err_probe(dev, err, "can't enable all axes\n");
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment