Re: [PATCH 1/3] PM / wakeirq: fix wake irq arming

From: Tony Lindgren
Date: Fri Jul 14 2023 - 03:48:19 EST


* Johan Hovold <johan+linaro@xxxxxxxxxx> [230713 15:01]:
> The decision whether to enable a wake irq during suspend can not be done
> based on the runtime PM state directly as a driver may use wake irqs
> without implementing runtime PM. Such drivers specifically leave the
> state set to the default 'suspended' and the wake irq is thus never
> enabled at suspend.
>
> Add a new wake irq flag to track whether a dedicated wake irq has been
> enabled at runtime suspend and therefore must not be enabled at system
> suspend.
>
> Note that pm_runtime_enabled() can not be used as runtime PM is always
> disabled during late suspend.

Works for me:

Reviewed-by: Tony Lindgren <tony@xxxxxxxxxxx>
Tested-by: Tony Lindgren <tony@xxxxxxxxxxx>