public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Tom Rini <trini@ti.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] tps65910x I2C RTC driver
Date: Fri, 24 Oct 2014 13:42:04 -0400	[thread overview]
Message-ID: <20141024174204.GX25506@bill-the-cat> (raw)
In-Reply-To: <5443C20D.1010900@tibbo.com>

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 <common.h> 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: <http://lists.denx.de/pipermail/u-boot/attachments/20141024/e4b63e43/attachment-0001.pgp>

      reply	other threads:[~2014-10-24 17:42 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-10-19 13:52 [U-Boot] tps65910x I2C RTC driver Dvorkin Dmitry
2014-10-24 17:42 ` Tom Rini [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20141024174204.GX25506@bill-the-cat \
    --to=trini@ti.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox