]> git.dujemihanovic.xyz Git - u-boot.git/commit
rtc: add dm_rtc_read helper and ->read method
authorRasmus Villemoes <rasmus.villemoes@prevas.dk>
Mon, 6 Jul 2020 20:01:10 +0000 (22:01 +0200)
committerHeiko Schocher <hs@denx.de>
Thu, 9 Jul 2020 04:02:44 +0000 (06:02 +0200)
commitd8be08805bc03d53b0dd6953792fba543a4f3890
tree1236ca71b86c47aa4c135881018078dc6974a6ef
parent35d3982e23d3449d93bcc4f1990e929998d69936
rtc: add dm_rtc_read helper and ->read method

Some users may want to read multiple consecutive 8-bit
registers. Instead of each caller having to implement the loop,
provide a dm_rtc_read() helper. Also, allow a driver to provide a
->read method, which can be more efficient than reading one register
at a time.

Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Heiko Schocher <hs@denx.de>
Signed-off-by: Rasmus Villemoes <rasmus.villemoes@prevas.dk>
drivers/rtc/rtc-uclass.c
include/rtc.h