public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Alexandre Belloni <alexandre.belloni@free-electrons.com>
To: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Alessandro Zummo <a.zummo@towertech.it>,
	Rob Herring <robh@kernel.org>,
	rtc-linux@googlegroups.com, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] rtc: sa1100: detect rcnr overflow with dates after 2038
Date: Tue, 19 Jan 2016 21:46:53 +0100	[thread overview]
Message-ID: <20160119204653.GY3367@piout.net> (raw)
In-Reply-To: <87si1tcol0.fsf@belgarion.home>

Hi,

On 19/01/2016 at 21:16:11 +0100, Robert Jarzmik wrote :
> Alexandre Belloni <alexandre.belloni@free-electrons.com> writes:
> 
> > rcnr will overflow in 2038, detect that overflow when setting the time and
> > get rid of the deprecated rtc_tm_to_time()
> >
> > Signed-off-by: Alexandre Belloni <alexandre.belloni@free-electrons.com>
> 
> That's very nice, but doesn't that limitation touch almost all drivers, and
> could benefit from a global solution in rtc_set_time() ?
> 
> What I'm thinking of is a field in rtc_device, a u64 which represents the
> maximal time that can be set (or 0 if no maximum). rtc_set_time() would check
> against that maximum and return -EINVAL.
> 
> For the rtc drivers, upon registration they can modify this value to set up this
> clamp. This will require to set only a value in each driver, which looks more
> robust to me.
> 

Actually, that is something I'm currently working on but it is not ready
yet.


-- 
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

      reply	other threads:[~2016-01-19 20:47 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-01-19  0:57 [PATCH] rtc: sa1100: detect rcnr overflow with dates after 2038 Alexandre Belloni
2016-01-19 20:16 ` Robert Jarzmik
2016-01-19 20:46   ` Alexandre Belloni [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=20160119204653.GY3367@piout.net \
    --to=alexandre.belloni@free-electrons.com \
    --cc=a.zummo@towertech.it \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robert.jarzmik@free.fr \
    --cc=robh@kernel.org \
    --cc=rtc-linux@googlegroups.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox