[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20160223230437.GC10681@piout.net>
Date: Wed, 24 Feb 2016 00:04:37 +0100
From: Alexandre Belloni <alexandre.belloni@...e-electrons.com>
To: Juergen Borleis <jbe@...gutronix.de>
Cc: rtc-linux@...glegroups.com,
Alessandro Zummo <a.zummo@...ertech.it>,
linux-kernel@...r.kernel.org, kernel@...gutronix.de,
jbe@...gutronix.de
Subject: Re: [PATCH v2] RTC/PCF85063: fix reading/setting time/date
On 09/02/2016 at 11:57:24 +0100, Juergen Borleis wrote :
> The PCF85063 RTC needs special treatment while setting or reading the
> time/date:
>
> - when reading the 7 time/date registers they are blocked from updating by
> the 'one second' pulse internally. So reading all time/date registers
> should happen in one turn to ensure reading is an atomic operation
>
> - to let setting the time/date be an atomic operation as well, the clock
> dividers must be kept in reset state to avoid a 'one second' pulse during
> writing the 7 time/date registers
>
> Changes from v1:
>
> - using high level I2C access functions instead of the low level i2c_transfer()
> to simplify the code
>
All applied, thanks!
However, I found two interesting things in that driver. I'll send a
patch shortly, removing the useless century handling.
Also, I'm quite unsure about the year range handling. I have a patch but
I'm not sure about the RTC behaviour when the year goes from 99 to 00.
Can you check that works properly?
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
Powered by blists - more mailing lists