From mboxrd@z Thu Jan 1 00:00:00 1970 From: Tom Rini Date: Fri, 24 Oct 2014 13:42:04 -0400 Subject: [U-Boot] tps65910x I2C RTC driver In-Reply-To: <5443C20D.1010900@tibbo.com> References: <5443C20D.1010900@tibbo.com> Message-ID: <20141024174204.GX25506@bill-the-cat> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de On Sun, Oct 19, 2014 at 05:52:13PM +0400, Dvorkin Dmitry wrote: > Hello! > > We are developing new board based on TI am33xx. (I'll send patch for > this new board later.) It have not internal RTC and we're using the > one from TPS65910 connected by I2C bus. > May I add this patch to U-Boot source? Thank you. In general, yes. First, please see http://www.denx.de/wiki/U-Boot/Patches and submit it with a signed-off-by line, in the series with your board port that uses it. Also, fix all of the checkpatch issues that I suspect it would point out. Aside from things like that: > +#if defined(CONFIG_CMD_DATE) No, don't guard the whole file on another config option please. > +/*---------------------------------------------------------------------*/ > +#undef DEBUG_RTC > + > +#ifdef DEBUG_RTC > +#define DEBUGR(fmt,args...) printf(fmt ,##args) > +#else > +#define DEBUGR(fmt,args...) > +#endif Just use debug() from and DEBUG to control it so you don't need #undef anything in your driver. > +/* usually TPS65910_CTRL_I2C_ADDR = 0x2D */ > +#ifndef CONFIG_SYS_I2C_RTC_ADDR > +#define CONFIG_SYS_I2C_RTC_ADDR TPS65910_CTRL_I2C_ADDR > +#endif This belongs in the board config file. -- Tom -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 836 bytes Desc: Digital signature URL: