rtc: s5m: replace open-coded read/modify/write registers with regmap helpers
authorAndré Draszik <andre.draszik@linaro.org>
Wed, 9 Apr 2025 20:37:52 +0000 (21:37 +0100)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Mon, 23 Jun 2025 21:58:40 +0000 (23:58 +0200)
commitb1248da008362323f75e8b84874586e9ea4c0b31
tree199d156cfe0eb188fd56e2dccde29ad8a7e518f5
parentf5adb1fa04d08731a13db48afafd1a5f4384d3c9
rtc: s5m: replace open-coded read/modify/write registers with regmap helpers

Instead of the open-coded read/modify/write sequence, we can simply use
the regmap helpers regmap_set_bits() and regmap_update_bits()
respectively.

This makes the code easier to read, and avoids extra work in case the
underlying bus supports updating bits via
struct regmap_bus::reg_update_bits() directly (which is the case for
S2MPG10 on gs101 where this driver communicates via ACPM).

Signed-off-by: André Draszik <andre.draszik@linaro.org>
Link: https://lore.kernel.org/r/20250409-s2mpg10-v4-31-d66d5f39b6bf@linaro.org
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/rtc-s5m.c