Commit a47d466d authored by Trevor Gamblin's avatar Trevor Gamblin Committed by Jonathan Cameron

iio: adc: ina2xx-adc: 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-11-88d1338c4cca@baylibre.comSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent b040275a
...@@ -1046,8 +1046,7 @@ static void ina2xx_remove(struct i2c_client *client) ...@@ -1046,8 +1046,7 @@ static void ina2xx_remove(struct i2c_client *client)
iio_device_unregister(indio_dev); iio_device_unregister(indio_dev);
/* Powerdown */ /* Powerdown */
ret = regmap_update_bits(chip->regmap, INA2XX_CONFIG, ret = regmap_clear_bits(chip->regmap, INA2XX_CONFIG, INA2XX_MODE_MASK);
INA2XX_MODE_MASK, 0);
if (ret) if (ret)
dev_warn(&client->dev, "Failed to power down device (%pe)\n", dev_warn(&client->dev, "Failed to power down device (%pe)\n",
ERR_PTR(ret)); ERR_PTR(ret));
......
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