summaryrefslogtreecommitdiff
path: root/drivers/rtc/rtc-test.c
diff options
context:
space:
mode:
authorHugo Villeneuve <hvilleneuve@dimonoff.com>2023-06-22 10:57:44 -0400
committerAlexandre Belloni <alexandre.belloni@bootlin.com>2023-07-27 22:54:51 +0200
commit31f077c374a8e7cf1960560c0c5e4065048557c0 (patch)
tree172366149c15ae69b4d2825791058367d69104b5 /drivers/rtc/rtc-test.c
parent06c2afb862f9da8dc5efa4b6076a0e48c3fbaaa5 (diff)
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>
Diffstat (limited to 'drivers/rtc/rtc-test.c')
0 files changed, 0 insertions, 0 deletions