]> git.baikalelectronics.ru Git - kernel.git/commit
rtc: isl12022: switch to using regmap API
authorRasmus Villemoes <linux@rasmusvillemoes.dk>
Wed, 21 Sep 2022 11:46:23 +0000 (13:46 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Wed, 12 Oct 2022 22:17:22 +0000 (00:17 +0200)
commit9e61cfe92eebdd9a080bbcffbffb5c7d44597240
tree4c02dd89c9024da184075e95bf29fd38c3f685b6
parente4e4e8f5a6e147a4c3b373020b4b29e4dfc081e1
rtc: isl12022: switch to using regmap API

The regmap abstraction allows us to avoid the private i2c transfer
helpers, and also offers some nice utility functions such as the
regmap_update_bits family.

While at it, simplify the code even more by not keeping track of
->write_enabled: rtc_set_time is not a hot path, so one extra i2c read
doesn't hurt (regmap_update_bits elides the write when the bits are
already as desired).

Signed-off-by: Rasmus Villemoes <linux@rasmusvillemoes.dk>
Link: https://lore.kernel.org/r/20220921114624.3250848-9-linux@rasmusvillemoes.dk
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
drivers/rtc/Kconfig
drivers/rtc/rtc-isl12022.c