Home
last modified time | relevance | path

Searched hist:"31 f077c374a8e7cf1960560c0c5e4065048557c0" (Results 1 – 1 of 1) sorted by relevance

/openbmc/linux/drivers/rtc/
H A Drtc-pcf2127.cdiff 31f077c374a8e7cf1960560c0c5e4065048557c0 Thu Jun 22 09:57:44 CDT 2023 Hugo Villeneuve <hvilleneuve@dimonoff.com> rtc: pcf2127: improve rtc_read_time() performance

Improve performance and readability of rtc_read_time() by reading only
the 7 time registers, instead of reading 8 registers (additional CTRL3
register).

We drop reading of CTRL3 to monitor the low battery flag, as this
check is already available in the ioctl. Anyway, this check only
display an info message and has no other impacts.

The code readability also improves as we do not have to fiddle with
buffer pointer and size arithmetic.

Signed-off-by: Hugo Villeneuve <hvilleneuve@dimonoff.com>
Link: https://lore.kernel.org/r/20230622145800.2442116-2-hugo@hugovil.com
Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>