From: Kevin Hilman <khilman@baylibre.com>
To: Ulf Hansson <ulf.hansson@linaro.org>
Cc: linux-pm@vger.kernel.org, Nishanth Menon <nm@ti.com>,
Vibhore Vardhan <vibhore@ti.com>, Dhruva Gole <d-gole@ti.com>,
Akashdeep Kaur <a-kaur@ti.com>,
Sebin Francis <sebin.francis@ti.com>,
Markus Schneider-Pargmann <msp@baylibre.com>,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v3 3/3] pmdomain: ti_sci: handle wake IRQs for IO daisy chain wakeups
Date: Fri, 06 Sep 2024 08:53:49 -0700 [thread overview]
Message-ID: <7hfrqcaicy.fsf@baylibre.com> (raw)
In-Reply-To: <CAPDyKFquSHYLGzd288K3JSOF_p+UyRO8GoBP9TGCR_3syGXTDw@mail.gmail.com>
Ulf Hansson <ulf.hansson@linaro.org> writes:
> On Fri, 6 Sept 2024 at 00:03, Kevin Hilman <khilman@baylibre.com> wrote:
>>
>> When a device supports IO daisy-chain wakeups, it uses a dedicated
>> wake IRQ. Devices with IO daisy-chain wakeups enabled should not set
>> wakeup constraints since these can happen even from deep power states,
>> so should not prevent the DM from picking deep power states.
>>
>> Wake IRQs are set with dev_pm_set_wake_irq() or
>> dev_pm_set_dedicated_wake_irq(). The latter is used by the serial
>> driver used on K3 platforms (drivers/tty/serial/8250/8250_omap.c)
>> when the interrupts-extended property is used to describe the
>> dedicated wakeup interrupt.
>>
>> Detect these wake IRQs in the suspend path, and if set, skip sending
>> constraint.
>>
>> Signed-off-by: Kevin Hilman <khilman@baylibre.com>
>> ---
>> drivers/pmdomain/ti/ti_sci_pm_domains.c | 7 +++++++
>> 1 file changed, 7 insertions(+)
>>
>> diff --git a/drivers/pmdomain/ti/ti_sci_pm_domains.c b/drivers/pmdomain/ti/ti_sci_pm_domains.c
>> index 1ab1e46924ab..747a7a33c0a9 100644
>> --- a/drivers/pmdomain/ti/ti_sci_pm_domains.c
>> +++ b/drivers/pmdomain/ti/ti_sci_pm_domains.c
>> @@ -82,6 +82,13 @@ static inline void ti_sci_pd_set_wkup_constraint(struct device *dev)
>> int ret;
>>
>> if (device_may_wakeup(dev)) {
>> + /*
>> + * If device can wakeup using IO daisy chain wakeups,
>> + * we do not want to set a constraint.
>> + */
>> + if (dev->power.wakeirq)
>> + dev_dbg(dev, "%s: has wake IRQ, not setting constraints\n", __func__);
>
> return; ?
>
Oops, I meant to remove the "false" return when changing from bool to
void, but mistakenly removed the whole line.
d'oh!, good catch.
Thanks.
Kevin
prev parent reply other threads:[~2024-09-06 15:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-05 22:02 [PATCH v3 0/3] pmdomain: ti_sci: collect and send low-power mode constraints Kevin Hilman
2024-09-05 22:02 ` [PATCH v3 1/3] pmdomain: ti_sci: add per-device latency constraint management Kevin Hilman
2024-09-06 9:00 ` Ulf Hansson
2024-09-05 22:02 ` [PATCH v3 2/3] pmdomain: ti_sci: add wakeup " Kevin Hilman
2024-09-06 9:01 ` Ulf Hansson
2024-09-05 22:02 ` [PATCH v3 3/3] pmdomain: ti_sci: handle wake IRQs for IO daisy chain wakeups Kevin Hilman
2024-09-06 8:54 ` Ulf Hansson
2024-09-06 15:53 ` Kevin Hilman [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=7hfrqcaicy.fsf@baylibre.com \
--to=khilman@baylibre.com \
--cc=a-kaur@ti.com \
--cc=d-gole@ti.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=msp@baylibre.com \
--cc=nm@ti.com \
--cc=sebin.francis@ti.com \
--cc=ulf.hansson@linaro.org \
--cc=vibhore@ti.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.