From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefan Roese Date: Thu, 13 Aug 2009 13:05:37 +0200 Subject: [U-Boot] [PATCH] Add driver for the ST M41T94 SPI RTC In-Reply-To: <1250158470-13212-1-git-send-email-albin.tonnerre@free-electrons.com> References: <1250158470-13212-1-git-send-email-albin.tonnerre@free-electrons.com> Message-ID: <200908131305.37039.sr@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 On Thursday 13 August 2009 12:14:30 Albin Tonnerre wrote: > This RTC is used in some Calao boards. The driver code is taken from the > linux rtc-m41t94 driver > > Signed-off-by: Albin Tonnerre > --- > > I guess the bin2bcd and bcd2bin functions belong somewhere in common/ > rather than this particular driver ... Where should I put them ? Currently we also have BIN2BCD/BCD2BIN macros in include/bcd.h. We should probably move to these lowercase inlined functions though. Perhaps you could create a patch to switch from BIN2BCD to bin2bcd in the RTC drivers and add those functions to bcd.h? Thanks. Cheers, Stefan -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-0 Fax: (+49)-8142-66989-80 Email: office at denx.de