From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: jianbin zhang <quic_jianbinz@quicinc.com>
Cc: "a.zummo@towertech.it" <a.zummo@towertech.it>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"linux-rtc@vger.kernel.org" <linux-rtc@vger.kernel.org>
Subject: Re: [PATCH] rtc: Disable alarm irq if alarm is enabled and alarm time is less than or equal to current time
Date: Tue, 14 Sep 2021 23:54:55 +0200 [thread overview]
Message-ID: <YUEaL9CjTpPMr3Go@piout.net> (raw)
In-Reply-To: <9c817836-64d6-1452-189f-2783c4138ace@quicinc.com>
On 14/09/2021 10:50:33+0800, jianbin zhang wrote:
>
> On 9/11/21 3:05 AM, Alexandre Belloni wrote:
> > Hello,
> >
> > Please format your patch properly.
>
> I am so sorry for bothering you because of the patch format. I test the patch format in the local and
>
> the format works well. Such case will not occur.
>
> > > If device is booted up by rtc alarm, the alarm irq will still be enabled and the alarm time is less than current rtc time before any alarm is set or canceled .
> > >
> > > If device is shut down this time, it will boot up automatically as the alarm irq is enabled and alarm time is less than current rtc time.
> > >
> > >
> > >
> > > For the situation that the alarm time and rtc time are equal to boot up the device, we expect irq to be false until another alarm is reconfigured, then irq becomes true again.
> > >
> > >
> > >
> > > So disable alarm irq if alarm is enabled and alarm time is less than or equal to current rtc time.
> > >
> > You should probably fix your driver instead of messing with the core.
> > From what I understand, you have:
> >
> > 1/ set the alarm
> > 2/ shutdown
> > 3/ alarm happens, the device boots
> > 4/ shutdown
> > 5/ alarm irq is still set, device boots again
> >
> > At step 3, your driver has to acknowledge and clear the irq
>
> Thanks for great reviewing.
> 1/Yeah, the steps you understand are right.
> 2/In fact I met the issue when using the core rtc driver.That means I do not have a private driver on the issue.
>
Well, the core isn't a driver, which driver are you using?
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
prev parent reply other threads:[~2021-09-14 21:55 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <BN6PR02MB33324335E951F54DA1B00667E1D69@BN6PR02MB3332.namprd02.prod.outlook.com>
2021-09-10 19:05 ` Alexandre Belloni
[not found] ` <9c817836-64d6-1452-189f-2783c4138ace@quicinc.com>
2021-09-14 21:54 ` 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=YUEaL9CjTpPMr3Go@piout.net \
--to=alexandre.belloni@bootlin.com \
--cc=a.zummo@towertech.it \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=quic_jianbinz@quicinc.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
all inboxes | Powered by JetHome®