[PATCH v3 05/41] iio: adc: axp20x_adc: make use of regmap_set_bits()
Trevor Gamblin
tgamblin at baylibre.com
Mon Jun 17 06:49:45 PDT 2024
Instead of using regmap_update_bits() and passing the mask twice, use
regmap_set_bits().
Suggested-by: Uwe Kleine-König <u.kleine-koenig at baylibre.com>
Signed-off-by: Trevor Gamblin <tgamblin at baylibre.com>
---
drivers/iio/adc/axp20x_adc.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/drivers/iio/adc/axp20x_adc.c b/drivers/iio/adc/axp20x_adc.c
index d6c51b0f48e3..00c1a01cac63 100644
--- a/drivers/iio/adc/axp20x_adc.c
+++ b/drivers/iio/adc/axp20x_adc.c
@@ -712,9 +712,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);
--
2.45.2
More information about the linux-amlogic
mailing list