Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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: 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-23-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Trevor Gamblin and committed by
Jonathan Cameron
0c9f6639 eceddd01

+4 -5
+4 -5
drivers/iio/health/afe4403.c
··· 422 422 struct afe4403_data *afe = iio_priv(indio_dev); 423 423 int ret; 424 424 425 - ret = regmap_update_bits(afe->regmap, AFE440X_CONTROL2, 426 - AFE440X_CONTROL2_PDN_AFE, 427 - AFE440X_CONTROL2_PDN_AFE); 425 + ret = regmap_set_bits(afe->regmap, AFE440X_CONTROL2, 426 + AFE440X_CONTROL2_PDN_AFE); 428 427 if (ret) 429 428 return ret; 430 429 ··· 448 449 return ret; 449 450 } 450 451 451 - ret = regmap_update_bits(afe->regmap, AFE440X_CONTROL2, 452 - AFE440X_CONTROL2_PDN_AFE, 0); 452 + ret = regmap_clear_bits(afe->regmap, AFE440X_CONTROL2, 453 + AFE440X_CONTROL2_PDN_AFE); 453 454 if (ret) 454 455 return ret; 455 456