From: Alexandre Belloni <alexandre.belloni@bootlin.com>
To: Anvesh Jain P <quic_ajainp@quicinc.com>
Cc: Alessandro Zummo <a.zummo@towertech.it>,
linux-rtc@vger.kernel.org, linux-kernel@vger.kernel.org,
Venkata Rao Kakani <quic_vkakani@quicinc.com>
Subject: Re: [PATCH] rtc: rtc-pm8xxx: control default alarm wake up capability
Date: Tue, 1 Aug 2023 21:34:08 +0200 [thread overview]
Message-ID: <202308011934080c7083b9@mail.local> (raw)
In-Reply-To: <93722831-dc83-8ea3-4af9-33eaefcf81be@quicinc.com>
On 01/08/2023 18:18:46+0530, Anvesh Jain P wrote:
> In automotive systems, RTC should not wake up the device when it is parked
> or when it is garage to avoid leakage current. providing a control from
> device tree to avoid RTC wake up based on the use case is reason for this
> patch.
>
Then simply avoid providing an IRQ or setting an alarm.
> On 8/1/2023 6:10 PM, Alexandre Belloni wrote:
> > On 01/08/2023 17:15:49+0530, Anvesh Jain P wrote:
> > > Enable & disable rtc alarm wake up capability based on
> > > default parameter passed from device tree.
> > >
> >
> > I see what you are doing but not why this is necessary, NAK.
> >
> > > Signed-off-by: Venkata Rao Kakani <quic_vkakani@quicinc.com>
> > > Signed-off-by: Anvesh Jain P <quic_ajainp@quicinc.com>
> > > ---
> > > drivers/rtc/rtc-pm8xxx.c | 3 +++
> > > 1 file changed, 3 insertions(+)
> > >
> > > diff --git a/drivers/rtc/rtc-pm8xxx.c b/drivers/rtc/rtc-pm8xxx.c
> > > index f6b779c12ca7..bed57be602b6 100644
> > > --- a/drivers/rtc/rtc-pm8xxx.c
> > > +++ b/drivers/rtc/rtc-pm8xxx.c
> > > @@ -523,6 +523,9 @@ static int pm8xxx_rtc_probe(struct platform_device *pdev)
> > > if (rc)
> > > return rc;
> > > + if (of_property_read_bool(pdev->dev.of_node, "disable-alarm-wakeup"))
> > > + device_set_wakeup_capable(&pdev->dev, false);
> > > +
> > > rc = dev_pm_set_wake_irq(&pdev->dev, rtc_dd->alarm_irq);
> > > if (rc)
> > > return rc;
> > >
> > > base-commit: 0a8db05b571ad5b8d5c8774a004c0424260a90bd
> > > --
> > > 2.17.1
> > >
> >
--
Alexandre Belloni, co-owner and COO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2023-08-01 19:34 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-01 11:45 [PATCH] rtc: rtc-pm8xxx: control default alarm wake up capability Anvesh Jain P
2023-08-01 12:40 ` Alexandre Belloni
2023-08-01 12:48 ` Anvesh Jain P
2023-08-01 19:34 ` Alexandre Belloni [this message]
2023-08-03 13:31 ` Anvesh Jain P
2023-08-03 13:39 ` Alexandre Belloni
2023-08-03 13:40 ` Alexandre Belloni
2023-08-07 4:56 ` Anvesh Jain P
2023-08-08 12:44 ` Alexandre Belloni
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=202308011934080c7083b9@mail.local \
--to=alexandre.belloni@bootlin.com \
--cc=a.zummo@towertech.it \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rtc@vger.kernel.org \
--cc=quic_ajainp@quicinc.com \
--cc=quic_vkakani@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;
as well as URLs for NNTP newsgroup(s).