diff options
| -rw-r--r-- | Documentation/power/suspend-and-interrupts.txt | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/Documentation/power/suspend-and-interrupts.txt b/Documentation/power/suspend-and-interrupts.txt index 50493c9284b4..8afb29a8604a 100644 --- a/Documentation/power/suspend-and-interrupts.txt +++ b/Documentation/power/suspend-and-interrupts.txt | |||
| @@ -112,8 +112,9 @@ any special interrupt handling logic for it to work. | |||
| 112 | IRQF_NO_SUSPEND and enable_irq_wake() | 112 | IRQF_NO_SUSPEND and enable_irq_wake() |
| 113 | ------------------------------------- | 113 | ------------------------------------- |
| 114 | 114 | ||
| 115 | There are no valid reasons to use both enable_irq_wake() and the IRQF_NO_SUSPEND | 115 | There are very few valid reasons to use both enable_irq_wake() and the |
| 116 | flag on the same IRQ. | 116 | IRQF_NO_SUSPEND flag on the same IRQ, and it is never valid to use both for the |
| 117 | same device. | ||
| 117 | 118 | ||
| 118 | First of all, if the IRQ is not shared, the rules for handling IRQF_NO_SUSPEND | 119 | First of all, if the IRQ is not shared, the rules for handling IRQF_NO_SUSPEND |
| 119 | interrupts (interrupt handlers are invoked after suspend_device_irqs()) are | 120 | interrupts (interrupt handlers are invoked after suspend_device_irqs()) are |
| @@ -122,4 +123,13 @@ handlers are not invoked after suspend_device_irqs()). | |||
| 122 | 123 | ||
| 123 | Second, both enable_irq_wake() and IRQF_NO_SUSPEND apply to entire IRQs and not | 124 | Second, both enable_irq_wake() and IRQF_NO_SUSPEND apply to entire IRQs and not |
| 124 | to individual interrupt handlers, so sharing an IRQ between a system wakeup | 125 | to individual interrupt handlers, so sharing an IRQ between a system wakeup |
| 125 | interrupt source and an IRQF_NO_SUSPEND interrupt source does not make sense. | 126 | interrupt source and an IRQF_NO_SUSPEND interrupt source does not generally |
| 127 | make sense. | ||
| 128 | |||
| 129 | In rare cases an IRQ can be shared between a wakeup device driver and an | ||
| 130 | IRQF_NO_SUSPEND user. In order for this to be safe, the wakeup device driver | ||
| 131 | must be able to discern spurious IRQs from genuine wakeup events (signalling | ||
| 132 | the latter to the core with pm_system_wakeup()), must use enable_irq_wake() to | ||
| 133 | ensure that the IRQ will function as a wakeup source, and must request the IRQ | ||
| 134 | with IRQF_COND_SUSPEND to tell the core that it meets these requirements. If | ||
| 135 | these requirements are not met, it is not valid to use IRQF_COND_SUSPEND. | ||
