iio: adc: axp20x_adc: make use of regmap_set_bits()
authorTrevor Gamblin <tgamblin@baylibre.com>
Mon, 17 Jun 2024 13:49:45 +0000 (09:49 -0400)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 25 Jun 2024 20:04:44 +0000 (21:04 +0100)
Instead of using regmap_update_bits() and passing the mask twice, use
regmap_set_bits().

Suggested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20240617-review-v3-5-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
drivers/iio/adc/axp20x_adc.c

index 913ea9e5d9c5fec1338e8eb77d3c46e7c0f68e8c..b487e577befb3db83ebd86af679c771bb2141227 100644 (file)
@@ -991,9 +991,8 @@ static int axp20x_probe(struct platform_device *pdev)
        regmap_write(info->regmap, AXP20X_ADC_EN1, info->data->adc_en1_mask);
 
        if (info->data->adc_en2_mask)
-               regmap_update_bits(info->regmap, AXP20X_ADC_EN2,
-                                  info->data->adc_en2_mask,
-                                  info->data->adc_en2_mask);
+               regmap_set_bits(info->regmap, AXP20X_ADC_EN2,
+                               info->data->adc_en2_mask);
 
        /* Configure ADCs rate */
        info->data->adc_rate(info, 100);