mirror-linux/drivers/base/power
Johan Hovold 8ab9ad1638 PM: sleep: wakeirq: fix wake irq arming
commit 8527beb120 upstream.

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: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-08-03 10:24:16 +02:00
..
Makefile
clock_ops.c
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-07-19 16:21:01 +02:00
domain_governor.c PM: domains: Allocate governor data dynamically based on a genpd governor 2022-05-19 20:16:05 +02:00
generic_ops.c
main.c Merge branches 'pm-sleep', 'pm-domains' and 'pm-docs' 2022-03-18 18:29:21 +01:00
power.h PM: sleep: wakeirq: fix wake irq arming 2023-08-03 10:24:16 +02:00
qos-test.c
qos.c
runtime.c PM: runtime: Do not call __rpm_callback() from rpm_idle() 2022-12-31 13:31:59 +01:00
sysfs.c
trace.c
wakeirq.c PM: sleep: wakeirq: fix wake irq arming 2023-08-03 10:24:16 +02:00
wakeup.c PM: wakeup: Add extra debugging statement for multiple active IRQs 2022-09-03 20:04:33 +02:00
wakeup_stats.c