[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190821113856.GB27031@piout.net>
Date: Wed, 21 Aug 2019 13:38:56 +0200
From: Alexandre Belloni <alexandre.belloni@...tlin.com>
To: Mark Brown <broonie@...nel.org>
Cc: Li Yang <leoyang.li@....com>, nandor.han@...sala.com,
Biwen Li <biwen.li@....com>, a.zummo@...ertech.it,
linux-rtc@...r.kernel.org, lkml <linux-kernel@...r.kernel.org>
Subject: Re: [v2] rtc: pcf85363/pcf85263: fix error that failed to run
hwclock -w
On 21/08/2019 12:30:29+0100, Mark Brown wrote:
> On Wed, Aug 21, 2019 at 01:24:13PM +0200, Alexandre Belloni wrote:
> > On 21/08/2019 12:21:42+0100, Mark Brown wrote:
> > > On Tue, Aug 20, 2019 at 01:33:14PM -0500, Li Yang wrote:
>
> > > > violation check of regmap rejects such access. According to
> > > > Alexcandre, the address wrapping is essential to the functionality of
>
> > > It's *essential*? Will innovation never cease?
>
> > To be clear, for some RTCs, its is the only way to accurately set the
> > time.
>
> What's the mechanism here? It's a very strange thing to require.
The clock control is on the first register, then you have sec, min,
hour, day, mon, year.
To be able to set the clock accurately, you need to first disable the
clock, then set the time and date and finally reenable the clock in the
first register. This should be done in a single i2c write.
--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Powered by blists - more mailing lists