projects
/
linux
/
.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0c9f663
)
iio: health: afe4404: make use of regmap_clear_bits(), regmap_set_bits()
author
Trevor Gamblin
<tgamblin@baylibre.com>
Mon, 17 Jun 2024 13:50:04 +0000
(09:50 -0400)
committer
Jonathan Cameron
<Jonathan.Cameron@huawei.com>
Tue, 25 Jun 2024 20:04:46 +0000
(21:04 +0100)
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>
drivers/iio/health/afe4404.c
patch
|
blob
|
history
diff --git
a/drivers/iio/health/afe4404.c
b/drivers/iio/health/afe4404.c
index 390fbb6effaf756778c4c46d0ef73e7a58a0787f..7f69baa1ed53b3a1da699ac841d7ecc1132a0b5b 100644
(file)
--- a/
drivers/iio/health/afe4404.c
+++ b/
drivers/iio/health/afe4404.c
@@
-430,9
+430,8
@@
static int afe4404_suspend(struct device *dev)
struct afe4404_data *afe = iio_priv(indio_dev);
int ret;
- ret = regmap_update_bits(afe->regmap, AFE440X_CONTROL2,
- AFE440X_CONTROL2_PDN_AFE,
- AFE440X_CONTROL2_PDN_AFE);
+ ret = regmap_set_bits(afe->regmap, AFE440X_CONTROL2,
+ AFE440X_CONTROL2_PDN_AFE);
if (ret)
return ret;
@@
-457,8
+456,8
@@
static int afe4404_resume(struct device *dev)
return ret;
}
- ret = regmap_
update
_bits(afe->regmap, AFE440X_CONTROL2,
-
AFE440X_CONTROL2_PDN_AFE, 0
);
+ ret = regmap_
clear
_bits(afe->regmap, AFE440X_CONTROL2,
+
AFE440X_CONTROL2_PDN_AFE
);
if (ret)
return ret;