diff options
Diffstat (limited to 'include/linux/interrupt.h')
| -rw-r--r-- | include/linux/interrupt.h | 27 | 
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 @@   * These flags used only by the kernel as part of the   * irq handling routines.   * - * IRQF_DISABLED - keep irqs disabled when calling the action handler. - *                 DEPRECATED. This flag is a NOOP and scheduled to be removed   * IRQF_SHARED - allow sharing the irq among several devices   * IRQF_PROBE_SHARED - set by callers when they expect sharing mismatches to occur   * IRQF_TIMER - Flag to mark this interrupt as timer interrupt @@ -52,13 +50,18 @@   * IRQF_ONESHOT - Interrupt is not reenabled after the hardirq handler finished.   *                Used by threaded interrupts which need to keep the   *                irq line disabled until the threaded handler has been run. - * IRQF_NO_SUSPEND - Do not disable this IRQ during suspend + * IRQF_NO_SUSPEND - Do not disable this IRQ during suspend.  Does not guarantee + *                   that this interrupt will wake the system from a suspended + *                   state.  See Documentation/power/suspend-and-interrupts.txt   * IRQF_FORCE_RESUME - Force enable it on resume even if IRQF_NO_SUSPEND is set   * IRQF_NO_THREAD - Interrupt cannot be threaded   * IRQF_EARLY_RESUME - Resume IRQ early during syscore instead of at device   *                resume time. + * IRQF_COND_SUSPEND - If the IRQ is shared with a NO_SUSPEND user, execute this + *                interrupt handler after suspending interrupts. For system + *                wakeup devices users need to implement wakeup detection in + *                their interrupt handlers.   */ -#define IRQF_DISABLED		0x00000020  #define IRQF_SHARED		0x00000080  #define IRQF_PROBE_SHARED	0x00000100  #define __IRQF_TIMER		0x00000200 @@ -70,6 +73,7 @@  #define IRQF_FORCE_RESUME	0x00008000  #define IRQF_NO_THREAD		0x00010000  #define IRQF_EARLY_RESUME	0x00020000 +#define IRQF_COND_SUSPEND	0x00040000  #define IRQF_TIMER		(__IRQF_TIMER | IRQF_NO_SUSPEND | IRQF_NO_THREAD) @@ -184,6 +188,7 @@ extern void devm_free_irq(struct device *dev, unsigned int irq, void *dev_id);  #endif  extern void disable_irq_nosync(unsigned int irq); +extern bool disable_hardirq(unsigned int irq);  extern void disable_irq(unsigned int irq);  extern void disable_percpu_irq(unsigned int irq);  extern void enable_irq(unsigned int irq); @@ -356,6 +361,20 @@ static inline int disable_irq_wake(unsigned int irq)  	return irq_set_irq_wake(irq, 0);  } +/* + * irq_get_irqchip_state/irq_set_irqchip_state specific flags + */ +enum irqchip_irq_state { +	IRQCHIP_STATE_PENDING,		/* Is interrupt pending? */ +	IRQCHIP_STATE_ACTIVE,		/* Is interrupt in progress? */ +	IRQCHIP_STATE_MASKED,		/* Is interrupt masked? */ +	IRQCHIP_STATE_LINE_LEVEL,	/* Is IRQ line high? */ +}; + +extern int irq_get_irqchip_state(unsigned int irq, enum irqchip_irq_state which, +				 bool *state); +extern int irq_set_irqchip_state(unsigned int irq, enum irqchip_irq_state which, +				 bool state);  #ifdef CONFIG_IRQ_FORCED_THREADING  extern bool force_irqthreads;  |