
On Mon, 4 May 2020 at 15:20, Rasmus Villemoes rasmus.villemoes@prevas.dk wrote:
Similar to how the rtc_{read,write}8_array 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 ->read8_array to make both rtc_read8() and rtc_read8_array() work - without this, a driver that provides rtc_read8_array() would most likely just duplicate the logic here for implementing a ->read8() method in term of its ->read8_array() method. The same remarks of course apply to the write case.
Signed-off-by: Rasmus Villemoes rasmus.villemoes@prevas.dk
drivers/rtc/rtc-uclass.c | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org
Please make sure you add tests for these methods.