aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/interrupt.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/interrupt.h')
-rw-r--r--include/linux/interrupt.h27
1 files changed, 23 insertions, 4 deletions
diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h
index d9b05b5bf8c7..950ae4501826 100644
--- a/include/linux/interrupt.h
+++ b/include/linux/interrupt.h
@@ -39,8 +39,6 @@
39 * These flags used only by the kernel as part of the 39 * These flags used only by the kernel as part of the
40 * irq handling routines. 40 * irq handling routines.
41 * 41 *
42 * IRQF_DISABLED - keep irqs disabled when calling the action handler.
43 * DEPRECATED. This flag is a NOOP and scheduled to be removed
44 * IRQF_SHARED - allow sharing the irq among several devices 42 * IRQF_SHARED - allow sharing the irq among several devices
45 * IRQF_PROBE_SHARED - set by callers when they expect sharing mismatches to occur 43 * IRQF_PROBE_SHARED - set by callers when they expect sharing mismatches to occur
46 * IRQF_TIMER - Flag to mark this interrupt as timer interrupt 44 * IRQF_TIMER - Flag to mark this interrupt as timer interrupt
@@ -52,13 +50,18 @@
52 * IRQF_ONESHOT - Interrupt is not reenabled after the hardirq handler finished. 50 * IRQF_ONESHOT - Interrupt is not reenabled after the hardirq handler finished.
53 * Used by threaded interrupts which need to keep the 51 * Used by threaded interrupts which need to keep the
54 * irq line disabled until the threaded handler has been run. 52 * irq line disabled until the threaded handler has been run.
55 * IRQF_NO_SUSPEND - Do not disable this IRQ during suspend 53 * IRQF_NO_SUSPEND - Do not disable this IRQ during suspend. Does not guarantee
54 * that this interrupt will wake the system from a suspended
55 * state. See Documentation/power/suspend-and-interrupts.txt
56 * IRQF_FORCE_RESUME - Force enable it on resume even if IRQF_NO_SUSPEND is set 56 * IRQF_FORCE_RESUME - Force enable it on resume even if IRQF_NO_SUSPEND is set
57 * IRQF_NO_THREAD - Interrupt cannot be threaded 57 * IRQF_NO_THREAD - Interrupt cannot be threaded
58 * IRQF_EARLY_RESUME - Resume IRQ early during syscore instead of at device 58 * IRQF_EARLY_RESUME - Resume IRQ early during syscore instead of at device
59 * resume time. 59 * resume time.
60 * IRQF_COND_SUSPEND - If the IRQ is shared with a NO_SUSPEND user, execute this
61 * interrupt handler after suspending interrupts. For system
62 * wakeup devices users need to implement wakeup detection in
63 * their interrupt handlers.
60 */ 64 */
61#define IRQF_DISABLED 0x00000020
62#define IRQF_SHARED 0x00000080 65#define IRQF_SHARED 0x00000080
63#define IRQF_PROBE_SHARED 0x00000100 66#define IRQF_PROBE_SHARED 0x00000100
64#define __IRQF_TIMER 0x00000200 67#define __IRQF_TIMER 0x00000200
@@ -70,6 +73,7 @@
70#define IRQF_FORCE_RESUME 0x00008000 73#define IRQF_FORCE_RESUME 0x00008000
71#define IRQF_NO_THREAD 0x00010000 74#define IRQF_NO_THREAD 0x00010000
72#define IRQF_EARLY_RESUME 0x00020000 75#define IRQF_EARLY_RESUME 0x00020000
76#define IRQF_COND_SUSPEND 0x00040000
73 77
74#define IRQF_TIMER (__IRQF_TIMER | IRQF_NO_SUSPEND | IRQF_NO_THREAD) 78#define IRQF_TIMER (__IRQF_TIMER | IRQF_NO_SUSPEND | IRQF_NO_THREAD)
75 79
@@ -184,6 +188,7 @@ extern void devm_free_irq(struct device *dev, unsigned int irq, void *dev_id);
184#endif 188#endif
185 189
186extern void disable_irq_nosync(unsigned int irq); 190extern void disable_irq_nosync(unsigned int irq);
191extern bool disable_hardirq(unsigned int irq);
187extern void disable_irq(unsigned int irq); 192extern void disable_irq(unsigned int irq);
188extern void disable_percpu_irq(unsigned int irq); 193extern void disable_percpu_irq(unsigned int irq);
189extern void enable_irq(unsigned int irq); 194extern void enable_irq(unsigned int irq);
@@ -356,6 +361,20 @@ static inline int disable_irq_wake(unsigned int irq)
356 return irq_set_irq_wake(irq, 0); 361 return irq_set_irq_wake(irq, 0);
357} 362}
358 363
364/*
365 * irq_get_irqchip_state/irq_set_irqchip_state specific flags
366 */
367enum irqchip_irq_state {
368 IRQCHIP_STATE_PENDING, /* Is interrupt pending? */
369 IRQCHIP_STATE_ACTIVE, /* Is interrupt in progress? */
370 IRQCHIP_STATE_MASKED, /* Is interrupt masked? */
371 IRQCHIP_STATE_LINE_LEVEL, /* Is IRQ line high? */
372};
373
374extern int irq_get_irqchip_state(unsigned int irq, enum irqchip_irq_state which,
375 bool *state);
376extern int irq_set_irqchip_state(unsigned int irq, enum irqchip_irq_state which,
377 bool state);
359 378
360#ifdef CONFIG_IRQ_FORCED_THREADING 379#ifdef CONFIG_IRQ_FORCED_THREADING
361extern bool force_irqthreads; 380extern bool force_irqthreads;