[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20190402095115.GW3430@piout.net>
Date: Tue, 2 Apr 2019 11:51:15 +0200
From: Alexandre Belloni <alexandre.belloni@...tlin.com>
To: Wolfram Sang <wsa@...-dreams.de>
Cc: Geert Uytterhoeven <geert@...ux-m68k.org>,
Steve Twiss <stwiss.opensource@...semi.com>,
"linux-rtc@...r.kernel.org" <linux-rtc@...r.kernel.org>,
Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
Wolfram Sang <wsa+renesas@...g-engineering.com>,
Support Opensource <Support.Opensource@...semi.com>,
Linux-Renesas <linux-renesas-soc@...r.kernel.org>
Subject: Re: [PATCH 1/2] rtc: da9063: set range
On 02/04/2019 11:33:59+0200, Wolfram Sang wrote:
> Hi Alexandre,
>
> > I had a look at the driver and I guess you have a 9063AD while Steve
> > uses another model.
> >
> > That explains why you need the uie_unsupported flag. The 9063AD can only
> > do alarms on a minute boundary.
>
> Bingo! Nice catch. I was on the wrong track because we have an early
> boot quirk handling for the DA on this platform and I was searching
> there for side effects. Makes all sense now. Thanks a lot for your help!
>
> > Since the move to hr_timer, the uie are done using the classic alarm or
> > they are emulated by the core. This improved the situation for many RTCs
> > that don't have a separate UIE but this made it worse for a few (and
> > this is an example). I have plan to work on this but didn't have the
> > time yet.
>
> I understand. That explains why my RTC knowledge from a few years ago
> feels so outdated :)
>
> > I suggest the following patch:
> >
> > ===
> >
> > From 37b2ab7d537e76e42bde64cf4b57701b0ed8e8cd Mon Sep 17 00:00:00 2001
> > From: Alexandre Belloni <alexandre.belloni@...tlin.com>
> > Date: Tue, 2 Apr 2019 10:06:46 +0200
> > Subject: [PATCH] rtc: da9063: set uie_unsupported when relevant
> >
> > The DA9063AD doesn't support alarms on any seconds and its granularity is
> > the minute. Set uie_unsupported in that case.
> >
> > Reported-by: Wolfram Sang <wsa@...-dreams.de>
>
> Please use this address:
>
> Reported-by: Wolfram Sang <wsa+renesas@...g-engineering.com>
>
> > Reported-by: Geert Uytterhoeven <geert@...ux-m68k.org>
>
> And probably Geert wants his "+renesas" address, too:
>
> Geert Uytterhoeven <geert+renesas@...der.be>
>
> > Signed-off-by: Alexandre Belloni <alexandre.belloni@...tlin.com>
> > ---
> > drivers/rtc/rtc-da9063.c | 3 +++
> > 1 file changed, 3 insertions(+)
> >
> > diff --git a/drivers/rtc/rtc-da9063.c b/drivers/rtc/rtc-da9063.c
> > index 1b792bcea3c7..53e690b0f3a2 100644
> > --- a/drivers/rtc/rtc-da9063.c
> > +++ b/drivers/rtc/rtc-da9063.c
> > @@ -475,6 +475,9 @@ static int da9063_rtc_probe(struct platform_device *pdev)
> > da9063_data_to_tm(data, &rtc->alarm_time, rtc);
> > rtc->rtc_sync = false;
> >
> > + if (config->rtc_data_start != RTC_SEC)
> > + rtc->rtc_dev->uie_unsupported = 1;
> > +
>
> I think we should have a comment here, like:
>
> /* FIXME: Make use of the TICK interrupt once the RTC core supports it */
>
Well, My plan is to go over all the uie_unsupported users once the
infrastructure is in place but I'll put a comment there.
> So, this helps the UIE test:
>
> Reviewed-by: Wolfram Sang <wsa+renesas@...g-engineering.com>
> Tested-by: Wolfram Sang <wsa+renesas@...g-engineering.com>
>
> And I guess we have to live with two of the alarm tests failing because
> of the minute granularity?
>
> Regards,
>
> Wolfram
>
--
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
Powered by blists - more mailing lists