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: magnetometer: ak8974: make use of regmap_set_bits()

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

Suggested-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Signed-off-by: Trevor Gamblin <tgamblin@baylibre.com>
Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20240617-review-v3-33-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Trevor Gamblin and committed by
Jonathan Cameron
e93bd172 df4083d3

+2 -8
+2 -8
drivers/iio/magnetometer/ak8974.c
··· 327 327 } 328 328 329 329 /* Force a measurement */ 330 - return regmap_update_bits(ak8974->map, 331 - AK8974_CTRL3, 332 - AK8974_CTRL3_FORCE, 333 - AK8974_CTRL3_FORCE); 330 + return regmap_set_bits(ak8974->map, AK8974_CTRL3, AK8974_CTRL3_FORCE); 334 331 } 335 332 336 333 static int ak8974_await_drdy(struct ak8974 *ak8974) ··· 435 438 } 436 439 437 440 /* Trigger self-test */ 438 - ret = regmap_update_bits(ak8974->map, 439 - AK8974_CTRL3, 440 - AK8974_CTRL3_SELFTEST, 441 - AK8974_CTRL3_SELFTEST); 441 + ret = regmap_set_bits(ak8974->map, AK8974_CTRL3, AK8974_CTRL3_SELFTEST); 442 442 if (ret) { 443 443 dev_err(dev, "could not write CTRL3\n"); 444 444 return ret;