]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
PM: sleep: wakeirq: fix wake irq arming
authorJohan Hovold <johan+linaro@kernel.org>
Thu, 13 Jul 2023 14:57:39 +0000 (16:57 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 11 Aug 2023 13:14:00 +0000 (15:14 +0200)
commitaeb4db8ab7f1c9c9196be62fb4a0afa2cd0ddf44
treece0599ae76d0dece89abb30e0fbc037fccd5e4ba
parentb5d3a4251bd2af87cef636ee491f1bda6988981d
PM: sleep: wakeirq: fix wake irq arming

[ Upstream commit 8527beb12087238d4387607597b4020bc393c4b4 ]

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.

Fixes: 69728051f5bf ("PM / wakeirq: Fix unbalanced IRQ enable for wakeirq")
Cc: 4.16+ <stable@vger.kernel.org> # 4.16+
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
Reviewed-by: Tony Lindgren <tony@atomide.com>
Tested-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/base/power/power.h
drivers/base/power/wakeirq.c