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: 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>

authored by

Trevor Gamblin and committed by
Jonathan Cameron
9d0142fc 0c9f6639

+4 -5
+4 -5
drivers/iio/health/afe4404.c
··· 430 430 struct afe4404_data *afe = iio_priv(indio_dev); 431 431 int ret; 432 432 433 - ret = regmap_update_bits(afe->regmap, AFE440X_CONTROL2, 434 - AFE440X_CONTROL2_PDN_AFE, 435 - AFE440X_CONTROL2_PDN_AFE); 433 + ret = regmap_set_bits(afe->regmap, AFE440X_CONTROL2, 434 + AFE440X_CONTROL2_PDN_AFE); 436 435 if (ret) 437 436 return ret; 438 437 ··· 456 457 return ret; 457 458 } 458 459 459 - ret = regmap_update_bits(afe->regmap, AFE440X_CONTROL2, 460 - AFE440X_CONTROL2_PDN_AFE, 0); 460 + ret = regmap_clear_bits(afe->regmap, AFE440X_CONTROL2, 461 + AFE440X_CONTROL2_PDN_AFE); 461 462 if (ret) 462 463 return ret; 463 464