linux/drivers/base/power
Johan Hovold aeb4db8ab7 PM: sleep: wakeirq: fix wake irq arming
[ Upstream commit 8527beb120 ]

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: 69728051f5 ("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>
History 2023-08-11 15:14:00 +02:00
..
clock_ops.c PM: runtime: add devm_pm_clk_create helper 2021-08-26 11:28:07 -07:00
common.c PM / Domains: Introduce dev_pm_domain_start() 2019-11-13 11:41:50 +01:00
domain.c PM: domains: fix integer overflow issues in genpd_parse_state() 2023-07-23 13:46:46 +02:00
domain_governor.c PM: domains: fix some kernel-doc issues 2021-06-08 14:56:11 +02:00
generic_ops.c drivers: base: power: add proper SPDX identifiers on files that did not have them. 2019-04-04 20:03:40 +02:00
main.c PM: core: keep irq flags in device_pm_check_callbacks() 2022-04-08 14:23:56 +02:00
Makefile PM / QoS: Initial kunit test 2019-11-29 12:04:49 +01:00
power.h PM: sleep: wakeirq: fix wake irq arming 2023-08-11 15:14:00 +02:00
qos-test.c kunit: allow kunit tests to be loaded as a module 2020-01-09 16:42:29 -07:00
qos.c PM / QoS: Restore DEV_PM_QOS_MIN/MAX_FREQUENCY 2019-11-29 12:04:50 +01:00
runtime.c PM / wakeirq: support enabling wake-up irq after runtime_suspend called 2023-08-11 15:14:00 +02:00
sysfs.c drivers core: Miscellaneous changes for sysfs_emit 2020-10-02 13:12:07 +02:00
trace.c rtc: Check return value from mc146818_get_time() 2022-04-13 20:59:14 +02:00
wakeirq.c PM: sleep: wakeirq: fix wake irq arming 2023-08-11 15:14:00 +02:00
wakeup.c PM: s2idle: ACPI: Fix wakeup interrupts handling 2022-02-16 12:56:19 +01:00
wakeup_stats.c PM: wakeup: remove redundant assignment to variable retval 2021-04-22 15:22:38 +02:00