rtc: omap: use rtc_write to access OMAP_RTC_OSC_REG
authorDario Binacchi <dariobin@libero.it>
Sun, 25 Apr 2021 14:59:23 +0000 (16:59 +0200)
committerAlexandre Belloni <alexandre.belloni@bootlin.com>
Thu, 29 Apr 2021 21:37:18 +0000 (23:37 +0200)
commite463786f380ab28f1ca6e34ea65bbc2e03b2d325
tree4f911aebf24ff0352fe13deda5d6919bac3cb961
parentfefbec3a741831bc7791a94a483ad55665160b50
rtc: omap: use rtc_write to access OMAP_RTC_OSC_REG

The RTC_OSC_REG register is 32-bit, but the useful information is found
in the 7 least significant bits (bits 7-31 are reserved). And in fact,
as you can see from the code, all read accesses are 8-bit, as well as
some writes. Let's make sure all writes are 8-bit. Moreover, in contexts
where consecutive reads / writes after the busy check must take place
within 15 us, it is better not to waste time on useless accesses.

Signed-off-by: Dario Binacchi <dariobin@libero.it>
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Link: https://lore.kernel.org/r/20210425145924.23353-1-dariobin@libero.it
drivers/rtc/rtc-omap.c