iio: accel: kxsd9: Make use of regmap_clear_bits()
authorTrevor Gamblin <tgamblin@baylibre.com>
Mon, 17 Jun 2024 13:49:42 +0000 (09:49 -0400)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 25 Jun 2024 20:04:43 +0000 (21:04 +0100)
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>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20240617-review-v3-2-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/accel/kxsd9.c

index ba99649..70dfd6e 100644 (file)
@@ -370,10 +370,7 @@ static int kxsd9_power_down(struct kxsd9_state *st)
         * make sure we conserve power even if there are others users on the
         * regulators.
         */
-       ret = regmap_update_bits(st->map,
-                                KXSD9_REG_CTRL_B,
-                                KXSD9_CTRL_B_ENABLE,
-                                0);
+       ret = regmap_clear_bits(st->map, KXSD9_REG_CTRL_B, KXSD9_CTRL_B_ENABLE);
        if (ret)
                return ret;