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.comSigned-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com>
Showing
Please register or sign in to comment