aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTrevor Gamblin <[email protected]>2024-06-17 09:49:45 -0400
committerJonathan Cameron <[email protected]>2024-06-25 21:04:44 +0100
commit4796fed269f87d0ee5ca8558710bd467fdaf75fb (patch)
tree916b7661cc9134db7b2be4398d7570fb75a9396c
parent52248aea53e1ad51942d4a425a5db7371f8d5e89 (diff)
iio: adc: axp20x_adc: make use of regmap_set_bits()
Instead of using regmap_update_bits() and passing the mask twice, use regmap_set_bits(). Suggested-by: Uwe Kleine-König <[email protected]> Signed-off-by: Trevor Gamblin <[email protected]> Acked-by: Uwe Kleine-König <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jonathan Cameron <[email protected]>
-rw-r--r--drivers/iio/adc/axp20x_adc.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/iio/adc/axp20x_adc.c b/drivers/iio/adc/axp20x_adc.c
index 913ea9e5d9c5..b487e577befb 100644
--- a/drivers/iio/adc/axp20x_adc.c
+++ b/drivers/iio/adc/axp20x_adc.c
@@ -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);