aboutsummaryrefslogtreecommitdiff
path: root/kernel/irq
diff options
context:
space:
mode:
authorGravatar Rafael J. Wysocki <rafael.j.wysocki@intel.com> 2019-09-17 09:35:35 +0200
committerGravatar Rafael J. Wysocki <rafael.j.wysocki@intel.com> 2019-09-17 09:35:35 +0200
commit1b531e55c52bbe2927e2c3490d47c82113d303e7 (patch)
tree9e0f3cc50d552165fc146057e6bea87db31d47c1 /kernel/irq
parentPM / wakeup: Unexport wakeup_source_sysfs_{add,remove}() (diff)
parentACPI: PM: s2idle: Always set up EC GPE for system wakeup (diff)
downloadlinux-1b531e55c52bbe2927e2c3490d47c82113d303e7.tar.gz
linux-1b531e55c52bbe2927e2c3490d47c82113d303e7.tar.bz2
linux-1b531e55c52bbe2927e2c3490d47c82113d303e7.zip
Merge suspend-to-idle rework material for v5.4.
* pm-s2idle-rework: (21 commits) ACPI: PM: s2idle: Always set up EC GPE for system wakeup ACPI: PM: s2idle: Avoid rearming SCI for wakeup unnecessarily PM: suspend: Fix platform_suspend_prepare_noirq() intel-hid: Disable button array during suspend-to-idle intel-hid: intel-vbtn: Avoid leaking wakeup_mode set ACPI: PM: s2idle: Execute LPS0 _DSM functions with suspended devices ACPI: EC: PM: Make acpi_ec_dispatch_gpe() print debug message ACPI: EC: PM: Consolidate some code depending on PM_SLEEP ACPI: PM: s2idle: Eliminate acpi_sleep_no_ec_events() ACPI: PM: s2idle: Switch EC over to polling during "noirq" suspend ACPI: PM: s2idle: Add acpi.sleep_no_lps0 module parameter ACPI: PM: s2idle: Rearrange lps0_device_attach() ACPI: PM: Set up EC GPE for system wakeup from drivers that need it PM: sleep: Drop dpm_noirq_begin() and dpm_noirq_end() PM: sleep: Integrate suspend-to-idle with generig suspend flow PM: sleep: Simplify suspend-to-idle control flow ACPI: PM: Set s2idle_wakeup earlier and clear it later PM: sleep: Fix possible overflow in pm_system_cancel_wakeup() ACPI: EC: Return bool from acpi_ec_dispatch_gpe() ACPICA: Return u32 from acpi_dispatch_gpe() ...
Diffstat (limited to 'kernel/irq')
-rw-r--r--kernel/irq/pm.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/kernel/irq/pm.c b/kernel/irq/pm.c
index d6961d3c6f9e..8f557fa1f4fe 100644
--- a/kernel/irq/pm.c
+++ b/kernel/irq/pm.c
@@ -177,6 +177,26 @@ static void resume_irqs(bool want_early)
}
/**
+ * rearm_wake_irq - rearm a wakeup interrupt line after signaling wakeup
+ * @irq: Interrupt to rearm
+ */
+void rearm_wake_irq(unsigned int irq)
+{
+ unsigned long flags;
+ struct irq_desc *desc = irq_get_desc_buslock(irq, &flags, IRQ_GET_DESC_CHECK_GLOBAL);
+
+ if (!desc || !(desc->istate & IRQS_SUSPENDED) ||
+ !irqd_is_wakeup_set(&desc->irq_data))
+ return;
+
+ desc->istate &= ~IRQS_SUSPENDED;
+ irqd_set(&desc->irq_data, IRQD_WAKEUP_ARMED);
+ __enable_irq(desc);
+
+ irq_put_desc_busunlock(desc, flags);
+}
+
+/**
* irq_pm_syscore_ops - enable interrupt lines early
*
* Enable all interrupt lines with %IRQF_EARLY_RESUME set.