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: mmc35240: 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>
Acked-by: Uwe Kleine-König <u.kleine-koenig@baylibre.com>
Link: https://patch.msgid.link/20240617-review-v3-34-88d1338c4cca@baylibre.com
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Trevor Gamblin and committed by
Jonathan Cameron
3b6f6e57 e93bd172

+3 -5
+3 -5
drivers/iio/magnetometer/mmc35240.c
··· 186 186 * Recharge the capacitor at VCAP pin, requested to be issued 187 187 * before a SET/RESET command. 188 188 */ 189 - ret = regmap_update_bits(data->regmap, MMC35240_REG_CTRL0, 190 - MMC35240_CTRL0_REFILL_BIT, 191 - MMC35240_CTRL0_REFILL_BIT); 189 + ret = regmap_set_bits(data->regmap, MMC35240_REG_CTRL0, 190 + MMC35240_CTRL0_REFILL_BIT); 192 191 if (ret < 0) 193 192 return ret; 194 193 usleep_range(MMC35240_WAIT_CHARGE_PUMP, MMC35240_WAIT_CHARGE_PUMP + 1); ··· 197 198 else 198 199 coil_bit = MMC35240_CTRL0_RESET_BIT; 199 200 200 - return regmap_update_bits(data->regmap, MMC35240_REG_CTRL0, 201 - coil_bit, coil_bit); 201 + return regmap_set_bits(data->regmap, MMC35240_REG_CTRL0, coil_bit); 202 202 203 203 } 204 204