From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiko Schocher Date: Thu, 9 Jul 2020 10:36:29 +0200 Subject: [PATCH v4 03/11] rtc: fall back to ->{read,write} if ->{read,write}8 are not provided In-Reply-To: <20200706200120.23093-4-rasmus.villemoes@prevas.dk> References: <20200706200120.23093-1-rasmus.villemoes@prevas.dk> <20200706200120.23093-4-rasmus.villemoes@prevas.dk> Message-ID: <276a35b2-0e90-08b8-3102-a5ff797865bf@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hello Rasmus, Am 06.07.2020 um 22:01 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 > Reviewed-by: Heiko Schocher > Signed-off-by: Rasmus Villemoes > --- > drivers/rtc/rtc-uclass.c | 25 +++++++++++++++++++------ > 1 file changed, 19 insertions(+), 6 deletions(-) Applied to u-boot-i2c.git master Thanks! 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