[PATCH] pmdomain: ti_sci: add wakeup constraint to parent devices of wakeup source

Kendall Willis posted 1 patch 1 month, 1 week ago
drivers/pmdomain/ti/ti_sci_pm_domains.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
[PATCH] pmdomain: ti_sci: add wakeup constraint to parent devices of wakeup source
Posted by Kendall Willis 1 month, 1 week ago
Set wakeup constraint for any device in a wakeup path. All parent devices
of a wakeup device should not be turned off during suspend. This ensures
the wakeup device is kept on while the system is suspended.

Cc: stable@vger.kernel.org
Fixes: 9d8aa0dd3be4 ("pmdomain: ti_sci: add wakeup constraint management")
Reported-by: Vitor Soares <vitor.soares@toradex.com>
Closes: https://lore.kernel.org/linux-pm/c0fe43a2339c802e9ce5900092cd530a2ba17a6b.camel@gmail.com/
Signed-off-by: Kendall Willis <k-willis@ti.com>
---
 drivers/pmdomain/ti/ti_sci_pm_domains.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/pmdomain/ti/ti_sci_pm_domains.c b/drivers/pmdomain/ti/ti_sci_pm_domains.c
index 18d33bc35dee1b3bf6107af1e414db377d515199..949e4115f930b93b18216fde46131b5c8931c9aa 100644
--- a/drivers/pmdomain/ti/ti_sci_pm_domains.c
+++ b/drivers/pmdomain/ti/ti_sci_pm_domains.c
@@ -86,7 +86,7 @@ static inline void ti_sci_pd_set_wkup_constraint(struct device *dev)
 	const struct ti_sci_handle *ti_sci = pd->parent->ti_sci;
 	int ret;
 
-	if (device_may_wakeup(dev)) {
+	if (device_may_wakeup(dev) || device_wakeup_path(dev)) {
 		/*
 		 * If device can wakeup using IO daisy chain wakeups,
 		 * we do not want to set a constraint.

---
base-commit: 7fd2df204f342fc17d1a0bfcd474b24232fb0f32
change-id: 20260506-wkup-constraint-9b0261b04df1

Best regards,
-- 
Kendall Willis <k-willis@ti.com>
Re: [PATCH] pmdomain: ti_sci: add wakeup constraint to parent devices of wakeup source
Posted by Ulf Hansson 1 week, 3 days ago
On Thu, May 7, 2026 at 5:16 AM Kendall Willis <k-willis@ti.com> wrote:
>
> Set wakeup constraint for any device in a wakeup path. All parent devices
> of a wakeup device should not be turned off during suspend. This ensures
> the wakeup device is kept on while the system is suspended.
>
> Cc: stable@vger.kernel.org
> Fixes: 9d8aa0dd3be4 ("pmdomain: ti_sci: add wakeup constraint management")
> Reported-by: Vitor Soares <vitor.soares@toradex.com>
> Closes: https://lore.kernel.org/linux-pm/c0fe43a2339c802e9ce5900092cd530a2ba17a6b.camel@gmail.com/
> Signed-off-by: Kendall Willis <k-willis@ti.com>

Applied for fixes, thanks!

Kind regards
Uffe


> ---
>  drivers/pmdomain/ti/ti_sci_pm_domains.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/pmdomain/ti/ti_sci_pm_domains.c b/drivers/pmdomain/ti/ti_sci_pm_domains.c
> index 18d33bc35dee1b3bf6107af1e414db377d515199..949e4115f930b93b18216fde46131b5c8931c9aa 100644
> --- a/drivers/pmdomain/ti/ti_sci_pm_domains.c
> +++ b/drivers/pmdomain/ti/ti_sci_pm_domains.c
> @@ -86,7 +86,7 @@ static inline void ti_sci_pd_set_wkup_constraint(struct device *dev)
>         const struct ti_sci_handle *ti_sci = pd->parent->ti_sci;
>         int ret;
>
> -       if (device_may_wakeup(dev)) {
> +       if (device_may_wakeup(dev) || device_wakeup_path(dev)) {
>                 /*
>                  * If device can wakeup using IO daisy chain wakeups,
>                  * we do not want to set a constraint.
>
> ---
> base-commit: 7fd2df204f342fc17d1a0bfcd474b24232fb0f32
> change-id: 20260506-wkup-constraint-9b0261b04df1
>
> Best regards,
> --
> Kendall Willis <k-willis@ti.com>
Re: [PATCH] pmdomain: ti_sci: add wakeup constraint to parent devices of wakeup source
Posted by Sebin Francis 4 weeks, 1 day ago

On 07/05/26 08:46, Kendall Willis wrote:
> Set wakeup constraint for any device in a wakeup path. All parent devices
> of a wakeup device should not be turned off during suspend. This ensures
> the wakeup device is kept on while the system is suspended.
> 
> Cc: stable@vger.kernel.org
> Fixes: 9d8aa0dd3be4 ("pmdomain: ti_sci: add wakeup constraint management")
> Reported-by: Vitor Soares <vitor.soares@toradex.com>
> Closes: https://lore.kernel.org/linux-pm/c0fe43a2339c802e9ce5900092cd530a2ba17a6b.camel@gmail.com/
> Signed-off-by: Kendall Willis <k-willis@ti.com>
> ---

Looks good to me.

Reviewed-by: Sebin Francis <sebin.francis@ti.com>

Sebin Francis

>   drivers/pmdomain/ti/ti_sci_pm_domains.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/pmdomain/ti/ti_sci_pm_domains.c b/drivers/pmdomain/ti/ti_sci_pm_domains.c
> index 18d33bc35dee1b3bf6107af1e414db377d515199..949e4115f930b93b18216fde46131b5c8931c9aa 100644
> --- a/drivers/pmdomain/ti/ti_sci_pm_domains.c
> +++ b/drivers/pmdomain/ti/ti_sci_pm_domains.c
> @@ -86,7 +86,7 @@ static inline void ti_sci_pd_set_wkup_constraint(struct device *dev)
>   	const struct ti_sci_handle *ti_sci = pd->parent->ti_sci;
>   	int ret;
>   
> -	if (device_may_wakeup(dev)) {
> +	if (device_may_wakeup(dev) || device_wakeup_path(dev)) {
>   		/*
>   		 * If device can wakeup using IO daisy chain wakeups,
>   		 * we do not want to set a constraint.
> 
> ---
> base-commit: 7fd2df204f342fc17d1a0bfcd474b24232fb0f32
> change-id: 20260506-wkup-constraint-9b0261b04df1
>  > Best regards,
Re: [PATCH] pmdomain: ti_sci: add wakeup constraint to parent devices of wakeup source
Posted by Vitor Soares 1 month ago
Hi Kendall,

On Wed, 2026-05-06 at 22:16 -0500, Kendall Willis wrote:
> Set wakeup constraint for any device in a wakeup path. All parent devices
> of a wakeup device should not be turned off during suspend. This ensures
> the wakeup device is kept on while the system is suspended.
> 

Thanks for the patch.

I tested it on our Verdin AM62P. As expected, suspend now fails cleanly with "-
19" when an SDIO WiFi module is registered as a wakeup source, instead of
crashing on resume:

ti-sci 44043000.system-controller: PM: failed to suspend: error -19

I did not test the IO daisy chain wakeup path, since that is out of scope for
this patch.

Best regards,
Vitor Soares
Re: [PATCH] pmdomain: ti_sci: add wakeup constraint to parent devices of wakeup source
Posted by Kendall Willis 1 month ago
On 17:51-20260511, Vitor Soares wrote:
> Hi Kendall,
> 
> On Wed, 2026-05-06 at 22:16 -0500, Kendall Willis wrote:
> > Set wakeup constraint for any device in a wakeup path. All parent devices
> > of a wakeup device should not be turned off during suspend. This ensures
> > the wakeup device is kept on while the system is suspended.
> > 
> 
> Thanks for the patch.
> 
> I tested it on our Verdin AM62P. As expected, suspend now fails cleanly with "-
> 19" when an SDIO WiFi module is registered as a wakeup source, instead of
> crashing on resume:
> 
> ti-sci 44043000.system-controller: PM: failed to suspend: error -19
> 
> I did not test the IO daisy chain wakeup path, since that is out of scope for
> this patch.
> 
> Best regards,
> Vitor Soares
> 

Hi Vitor,

Thanks for testing the patch! Could you add your Tested-by tag?

Best,
Kendall
Re: [PATCH] pmdomain: ti_sci: add wakeup constraint to parent devices of wakeup source
Posted by Vitor Soares 1 month ago
On Tue, 2026-05-12 at 11:17 -0500, Kendall Willis wrote:
> On 17:51-20260511, Vitor Soares wrote:
> > Hi Kendall,
> > 
> > On Wed, 2026-05-06 at 22:16 -0500, Kendall Willis wrote:
> > > Set wakeup constraint for any device in a wakeup path. All parent devices
> > > of a wakeup device should not be turned off during suspend. This ensures
> > > the wakeup device is kept on while the system is suspended.
> > > 
> > 
> > Thanks for the patch.
> > 
> > I tested it on our Verdin AM62P. As expected, suspend now fails cleanly with
> > "-
> > 19" when an SDIO WiFi module is registered as a wakeup source, instead of
> > crashing on resume:
> > 
> > ti-sci 44043000.system-controller: PM: failed to suspend: error -19
> > 
> > I did not test the IO daisy chain wakeup path, since that is out of scope
> > for
> > this patch.
> > 
> > Best regards,
> > Vitor Soares
> > 
> 
> Hi Vitor,
> 
> Thanks for testing the patch! Could you add your Tested-by tag?
> 
> Best,
> Kendall

Hi Kendall,

Sure:
Tested-by: Vitor Soares vitor.soares@toradex.com

Best regards,
Vitor