Commit 0c9f6639 authored by Trevor Gamblin's avatar Trevor Gamblin Committed by Jonathan Cameron

iio: health: afe4403: make use of regmap_clear_bits(), regmap_set_bits()

Instead of using regmap_update_bits() and passing the mask twice, use
regmap_set_bits().

Instead of using regmap_update_bits() and passing val = 0, use
regmap_clear_bits().
Suggested-by: default avatarUwe Kleine-König <u.kleine-koenig@baylibre.com>
Signed-off-by: default avatarTrevor Gamblin <tgamblin@baylibre.com>
Acked-by: default avatarUwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20240617-review-v3-23-88d1338c4cca@baylibre.comSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent eceddd01
...@@ -422,9 +422,8 @@ static int afe4403_suspend(struct device *dev) ...@@ -422,9 +422,8 @@ static int afe4403_suspend(struct device *dev)
struct afe4403_data *afe = iio_priv(indio_dev); struct afe4403_data *afe = iio_priv(indio_dev);
int ret; int ret;
ret = regmap_update_bits(afe->regmap, AFE440X_CONTROL2, ret = regmap_set_bits(afe->regmap, AFE440X_CONTROL2,
AFE440X_CONTROL2_PDN_AFE, AFE440X_CONTROL2_PDN_AFE);
AFE440X_CONTROL2_PDN_AFE);
if (ret) if (ret)
return ret; return ret;
...@@ -449,8 +448,8 @@ static int afe4403_resume(struct device *dev) ...@@ -449,8 +448,8 @@ static int afe4403_resume(struct device *dev)
return ret; return ret;
} }
ret = regmap_update_bits(afe->regmap, AFE440X_CONTROL2, ret = regmap_clear_bits(afe->regmap, AFE440X_CONTROL2,
AFE440X_CONTROL2_PDN_AFE, 0); AFE440X_CONTROL2_PDN_AFE);
if (ret) if (ret)
return ret; return ret;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment