linux-stable/drivers/base/power
Johan Hovold 8527beb120 PM: sleep: wakeirq: fix wake irq arming
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>
2023-07-24 09:51:51 +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: Extend dev_pm_domain_detach() doc 2022-04-13 17:07:58 +02:00
domain.c PM: domains: Move the verification of in-params from genpd_add_device() 2023-06-16 19:39:51 +02:00
domain_governor.c PM: domains: Store the next hrtimer wakeup in genpd 2022-11-09 21:14:21 -06:00
generic_ops.c
main.c PM: core: Remove unnecessary (void *) conversions 2023-04-07 13:27:13 +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-07-24 09:51:51 +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 Power management updates for 6.3-rc1 2023-02-21 12:13:58 -08: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() 2021-12-16 21:50:06 +01:00
wakeirq.c PM: sleep: wakeirq: fix wake irq arming 2023-07-24 09:51:51 +02:00
wakeup.c PM: suspend: Fix pm_suspend_target_state handling for !CONFIG_PM 2023-05-24 18:52:14 +02:00
wakeup_stats.c driver core: class: remove module * from class_create() 2023-03-17 15:16:33 +01:00