[PATCH v3 03/10] rtc: fall back to ->{read,write} if ->{read,write}8 are not provided
Heiko Schocher
hs at denx.de
Wed Jun 3 06:21:54 CEST 2020
Hello Rasmus,
Am 02.06.2020 um 21:13 schrieb Rasmus Villemoes:
> Similar to how the dm_rtc_{read,write} functions fall back to using
> the {read,write}8 methods, do the opposite in the rtc_{read,write}8
> functions.
>
> This way, each driver only needs to provide either ->read8 or ->read
> to make both rtc_read8() and dm_rtc_read() work - without this, a
> driver that provides ->read() would most likely just duplicate the
> logic here for implementing a ->read8() method in term of its ->read()
> method. The same remarks of course apply to the write case.
>
> Reviewed-by: Simon Glass <sjg at chromium.org>
> Signed-off-by: Rasmus Villemoes <rasmus.villemoes at prevas.dk>
> ---
> drivers/rtc/rtc-uclass.c | 24 ++++++++++++++++++------
> 1 file changed, 18 insertions(+), 6 deletions(-)
Reviewed-by: Heiko Schocher <hs at denx.de>
bye,
Heiko
--
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-52 Fax: +49-8142-66989-80 Email: hs at denx.de
More information about the U-Boot
mailing list