iio: dac: stm32-dac-core: 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 <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-20-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
090510b902
commit
c1cf171365
@ -200,8 +200,7 @@ static int stm32_dac_core_resume(struct device *dev)
|
|||||||
|
|
||||||
if (priv->common.hfsel) {
|
if (priv->common.hfsel) {
|
||||||
/* restore hfsel (maybe lost under low power state) */
|
/* restore hfsel (maybe lost under low power state) */
|
||||||
ret = regmap_update_bits(priv->common.regmap, STM32_DAC_CR,
|
ret = regmap_set_bits(priv->common.regmap, STM32_DAC_CR,
|
||||||
STM32H7_DAC_CR_HFSEL,
|
|
||||||
STM32H7_DAC_CR_HFSEL);
|
STM32H7_DAC_CR_HFSEL);
|
||||||
if (ret)
|
if (ret)
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user