Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1312504

Re: [PATCH] rtc: sa1100: detect rcnr overflow with dates after 2038

From Alexandre Belloni <alexandre.belloni@free-electrons.com>
Newsgroups linux.kernel
Subject Re: [PATCH] rtc: sa1100: detect rcnr overflow with dates after 2038
Date 2016-01-19 21:50 +0100
Message-ID <qSLnY-4xA-15@gated-at.bofh.it> (permalink)
References <qSsOl-8n-1@gated-at.bofh.it> <qSKUW-4lv-21@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Back to linux.kernel | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

[PATCH] rtc: sa1100: detect rcnr overflow with dates after 2038 Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-01-19 02:00 +0100
  Re: [PATCH] rtc: sa1100: detect rcnr overflow with dates after 2038 Robert Jarzmik <robert.jarzmik@free.fr> - 2016-01-19 21:20 +0100
    Re: [PATCH] rtc: sa1100: detect rcnr overflow with dates after 2038 Alexandre Belloni <alexandre.belloni@free-electrons.com> - 2016-01-19 21:50 +0100

csiph-web