mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-12 05:24:12 +08:00
iio: health: afe4404
: 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: 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-24-88d1338c4cca@baylibre.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
This commit is contained in:
parent
0c9f6639f5
commit
9d0142fc9e
@ -430,9 +430,8 @@ static int afe4404_suspend(struct device *dev)
|
|||||||
struct afe4404_data *afe = iio_priv(indio_dev);
|
struct afe4404_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;
|
||||||
|
|
||||||
@ -457,8 +456,8 @@ static int afe4404_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;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user