diff options
| author | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-07-03 13:49:45 -0400 | 
|---|---|---|
| committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-07-03 13:49:45 -0400 | 
| commit | 026477c1141b67e98e3bd8bdedb7d4b88a3ecd09 (patch) | |
| tree | 2624a44924c625c367f3cebf937853b9da2de282 /include/linux/interrupt.h | |
| parent | 9f2fa466383ce100b90fe52cb4489d7a26bf72a9 (diff) | |
| parent | 29454dde27d8e340bb1987bad9aa504af7081eba (diff) | |
Merge branch 'master' of /home/trondmy/kernel/linux-2.6/
Diffstat (limited to 'include/linux/interrupt.h')
| -rw-r--r-- | include/linux/interrupt.h | 63 | 
1 files changed, 63 insertions, 0 deletions
| diff --git a/include/linux/interrupt.h b/include/linux/interrupt.h index 70741e170114..da3e0dbe61d4 100644 --- a/include/linux/interrupt.h +++ b/include/linux/interrupt.h | |||
| @@ -14,6 +14,55 @@ | |||
| 14 | #include <asm/ptrace.h> | 14 | #include <asm/ptrace.h> | 
| 15 | #include <asm/system.h> | 15 | #include <asm/system.h> | 
| 16 | 16 | ||
| 17 | /* | ||
| 18 | * These correspond to the IORESOURCE_IRQ_* defines in | ||
| 19 | * linux/ioport.h to select the interrupt line behaviour. When | ||
| 20 | * requesting an interrupt without specifying a IRQF_TRIGGER, the | ||
| 21 | * setting should be assumed to be "as already configured", which | ||
| 22 | * may be as per machine or firmware initialisation. | ||
| 23 | */ | ||
| 24 | #define IRQF_TRIGGER_NONE 0x00000000 | ||
| 25 | #define IRQF_TRIGGER_RISING 0x00000001 | ||
| 26 | #define IRQF_TRIGGER_FALLING 0x00000002 | ||
| 27 | #define IRQF_TRIGGER_HIGH 0x00000004 | ||
| 28 | #define IRQF_TRIGGER_LOW 0x00000008 | ||
| 29 | #define IRQF_TRIGGER_MASK (IRQF_TRIGGER_HIGH | IRQF_TRIGGER_LOW | \ | ||
| 30 | IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING) | ||
| 31 | #define IRQF_TRIGGER_PROBE 0x00000010 | ||
| 32 | |||
| 33 | /* | ||
| 34 | * These flags used only by the kernel as part of the | ||
| 35 | * irq handling routines. | ||
| 36 | * | ||
| 37 | * IRQF_DISABLED - keep irqs disabled when calling the action handler | ||
| 38 | * IRQF_SAMPLE_RANDOM - irq is used to feed the random generator | ||
| 39 | * IRQF_SHARED - allow sharing the irq among several devices | ||
| 40 | * IRQF_PROBE_SHARED - set by callers when they expect sharing mismatches to occur | ||
| 41 | * IRQF_TIMER - Flag to mark this interrupt as timer interrupt | ||
| 42 | */ | ||
| 43 | #define IRQF_DISABLED 0x00000020 | ||
| 44 | #define IRQF_SAMPLE_RANDOM 0x00000040 | ||
| 45 | #define IRQF_SHARED 0x00000080 | ||
| 46 | #define IRQF_PROBE_SHARED 0x00000100 | ||
| 47 | #define IRQF_TIMER 0x00000200 | ||
| 48 | #define IRQF_PERCPU 0x00000400 | ||
| 49 | |||
| 50 | /* | ||
| 51 | * Migration helpers. Scheduled for removal in 1/2007 | ||
| 52 | * Do not use for new code ! | ||
| 53 | */ | ||
| 54 | #define SA_INTERRUPT IRQF_DISABLED | ||
| 55 | #define SA_SAMPLE_RANDOM IRQF_SAMPLE_RANDOM | ||
| 56 | #define SA_SHIRQ IRQF_SHARED | ||
| 57 | #define SA_PROBEIRQ IRQF_PROBE_SHARED | ||
| 58 | #define SA_PERCPU IRQF_PERCPU | ||
| 59 | |||
| 60 | #define SA_TRIGGER_LOW IRQF_TRIGGER_LOW | ||
| 61 | #define SA_TRIGGER_HIGH IRQF_TRIGGER_HIGH | ||
| 62 | #define SA_TRIGGER_FALLING IRQF_TRIGGER_FALLING | ||
| 63 | #define SA_TRIGGER_RISING IRQF_TRIGGER_RISING | ||
| 64 | #define SA_TRIGGER_MASK IRQF_TRIGGER_MASK | ||
| 65 | |||
| 17 | struct irqaction { | 66 | struct irqaction { | 
| 18 | irqreturn_t (*handler)(int, void *, struct pt_regs *); | 67 | irqreturn_t (*handler)(int, void *, struct pt_regs *); | 
| 19 | unsigned long flags; | 68 | unsigned long flags; | 
| @@ -36,6 +85,20 @@ extern void free_irq(unsigned int, void *); | |||
| 36 | extern void disable_irq_nosync(unsigned int irq); | 85 | extern void disable_irq_nosync(unsigned int irq); | 
| 37 | extern void disable_irq(unsigned int irq); | 86 | extern void disable_irq(unsigned int irq); | 
| 38 | extern void enable_irq(unsigned int irq); | 87 | extern void enable_irq(unsigned int irq); | 
| 88 | |||
| 89 | /* IRQ wakeup (PM) control: */ | ||
| 90 | extern int set_irq_wake(unsigned int irq, unsigned int on); | ||
| 91 | |||
| 92 | static inline int enable_irq_wake(unsigned int irq) | ||
| 93 | { | ||
| 94 | return set_irq_wake(irq, 1); | ||
| 95 | } | ||
| 96 | |||
| 97 | static inline int disable_irq_wake(unsigned int irq) | ||
| 98 | { | ||
| 99 | return set_irq_wake(irq, 0); | ||
| 100 | } | ||
| 101 | |||
| 39 | #endif | 102 | #endif | 
| 40 | 103 | ||
| 41 | #ifndef __ARCH_SET_SOFTIRQ_PENDING | 104 | #ifndef __ARCH_SET_SOFTIRQ_PENDING | 
