All of lore.kernel.org
 help / color / mirror / Atom feed
From: Marc Dietrich <marvin24@gmx.de>
To: Laxman Dewangan <ldewangan@nvidia.com>
Cc: akpm@linuxfoundation.org, a.zummo@towertech.it,
	rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org,
	swarren@nvidia.com
Subject: Re: [PATCH V2] rtc: add RTC driver for TPS6586x
Date: Thu, 27 Dec 2012 15:56:32 +0100	[thread overview]
Message-ID: <7345841.MepJzddHFh@ax5200p> (raw)
In-Reply-To: <1356102748-722-1-git-send-email-ldewangan@nvidia.com>

Hi Laxman,

On Friday 21 December 2012 20:42:28 you wrote:
> Add an RTC driver for TPS6586X chips by TI.
> This driver supports:
> - Setting and getting time and date.
> - Setting and reading alarm time.
> - Alarm and interrupt functionlity.
> 
> Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
> ---
> Changes from V1:
> - Remove WARN flag, just returning error is fine.
> - Register interrupt after rtc device register.
> 
>  drivers/rtc/Kconfig        |    8 +
>  drivers/rtc/Makefile       |    1 +
>  drivers/rtc/rtc-tps6586x.c |  356
> ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 365
> insertions(+), 0 deletions(-)
>  create mode 100644 drivers/rtc/rtc-tps6586x.c
> 
....
>
> diff --git a/drivers/rtc/rtc-tps6586x.c b/drivers/rtc/rtc-tps6586x.c
> new file mode 100644
> index 0000000..d9a50a0
> --- /dev/null
> +++ b/drivers/rtc/rtc-tps6586x.c
....
>
> +static int tps6586x_rtc_probe(struct platform_device *pdev)
> +{
> +	struct device *tps_dev = to_tps6586x_dev(&pdev->dev);
> +	struct tps6586x_rtc *rtc;
> +	int ret;
> +
> +	rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL);
> +	if (!rtc)
> +		return -ENOMEM;
> +
> +	rtc->dev = &pdev->dev;
> +	rtc->irq = platform_get_irq(pdev, 0);
> +
> +	/* Set epoch start as 00:00:00:01:01:2000 */
> +	rtc->epoch_start = mktime(2000, 1, 1, 0, 0, 0);

any reason why you hard coded it to 2000? All boards I know use 2009, so with 
this patch, everyone needs to set his clock again.

Marc


  reply	other threads:[~2012-12-27 14:56 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-21 15:12 [PATCH V2] rtc: add RTC driver for TPS6586x Laxman Dewangan
2012-12-27 14:56 ` Marc Dietrich [this message]
2012-12-27 14:59   ` Laxman Dewangan
2012-12-27 15:56     ` Marc Dietrich
2012-12-27 16:59       ` Laxman Dewangan
2013-01-02 23:50     ` Andrew Morton
2013-01-03  6:16       ` Laxman Dewangan

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=7345841.MepJzddHFh@ax5200p \
    --to=marvin24@gmx.de \
    --cc=a.zummo@towertech.it \
    --cc=akpm@linuxfoundation.org \
    --cc=ldewangan@nvidia.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rtc-linux@googlegroups.com \
    --cc=swarren@nvidia.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.