aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/irq.h
diff options
context:
space:
mode:
authorThomas Gleixner <tglx@linutronix.de>2011-02-08 11:27:18 -0500
committerThomas Gleixner <tglx@linutronix.de>2011-02-19 06:58:21 -0500
commit5d4d8fc9ac3e9a90bbdf90bae6864cb2c01f2208 (patch)
tree5ec451adff8792ed345bac22c91d8565b11ba61a /include/linux/irq.h
parentf9e4989eb8183a1f33581fa1b99274287b0639d2 (diff)
genirq: Cleanup irq.h
Put the constants into an enum and document them. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Diffstat (limited to 'include/linux/irq.h')
-rw-r--r--include/linux/irq.h95
1 files changed, 62 insertions, 33 deletions
diff --git a/include/linux/irq.h b/include/linux/irq.h
index be73c0a3c19d..2e3d1e5f0408 100644
--- a/include/linux/irq.h
+++ b/include/linux/irq.h
@@ -36,44 +36,73 @@ typedef void (*irq_flow_handler_t)(unsigned int irq,
36/* 36/*
37 * IRQ line status. 37 * IRQ line status.
38 * 38 *
39 * Bits 0-7 are reserved for the IRQF_* bits in linux/interrupt.h 39 * Bits 0-7 are the same as the IRQF_* bits in linux/interrupt.h
40 *
41 * IRQ_TYPE_NONE - default, unspecified type
42 * IRQ_TYPE_EDGE_RISING - rising edge triggered
43 * IRQ_TYPE_EDGE_FALLING - falling edge triggered
44 * IRQ_TYPE_EDGE_BOTH - rising and falling edge triggered
45 * IRQ_TYPE_LEVEL_HIGH - high level triggered
46 * IRQ_TYPE_LEVEL_LOW - low level triggered
47 * IRQ_TYPE_LEVEL_MASK - Mask to filter out the level bits
48 * IRQ_TYPE_SENSE_MASK - Mask for all the above bits
49 * IRQ_TYPE_PROBE - Special flag for probing in progress
50 *
51 * Bits which can be modified via irq_set/clear/modify_status_flags()
52 * IRQ_LEVEL - Interrupt is level type. Will be also
53 * updated in the code when the above trigger
54 * bits are modified via set_irq_type()
55 * IRQ_PER_CPU - Mark an interrupt PER_CPU. Will protect
56 * it from affinity setting
57 * IRQ_NOPROBE - Interrupt cannot be probed by autoprobing
58 * IRQ_NOREQUEST - Interrupt cannot be requested via
59 * request_irq()
60 * IRQ_NOAUTOEN - Interrupt is not automatically enabled in
61 * request/setup_irq()
62 * IRQ_NO_BALANCING - Interrupt cannot be balanced (affinity set)
63 * IRQ_MOVE_PCNTXT - Interrupt can be migrated from process context
64 * IRQ_NESTED_TRHEAD - Interrupt nests into another thread
65 *
66 * Deprecated bits. They are kept updated as long as
67 * CONFIG_GENERIC_HARDIRQS_NO_COMPAT is not set. Will go away soon. These bits
68 * are internal state of the core code and if you really need to acces
69 * them then talk to the genirq maintainer instead of hacking
70 * something weird.
40 * 71 *
41 * IRQ types
42 */ 72 */
43#define IRQ_TYPE_NONE 0x00000000 /* Default, unspecified type */ 73enum {
44#define IRQ_TYPE_EDGE_RISING 0x00000001 /* Edge rising type */ 74 IRQ_TYPE_NONE = 0x00000000,
45#define IRQ_TYPE_EDGE_FALLING 0x00000002 /* Edge falling type */ 75 IRQ_TYPE_EDGE_RISING = 0x00000001,
46#define IRQ_TYPE_EDGE_BOTH (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING) 76 IRQ_TYPE_EDGE_FALLING = 0x00000002,
47#define IRQ_TYPE_LEVEL_HIGH 0x00000004 /* Level high type */ 77 IRQ_TYPE_EDGE_BOTH = (IRQ_TYPE_EDGE_FALLING | IRQ_TYPE_EDGE_RISING),
48#define IRQ_TYPE_LEVEL_LOW 0x00000008 /* Level low type */ 78 IRQ_TYPE_LEVEL_HIGH = 0x00000004,
49#define IRQ_TYPE_LEVEL_MASK (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH) 79 IRQ_TYPE_LEVEL_LOW = 0x00000008,
50#define IRQ_TYPE_SENSE_MASK 0x0000000f /* Mask of the above */ 80 IRQ_TYPE_LEVEL_MASK = (IRQ_TYPE_LEVEL_LOW | IRQ_TYPE_LEVEL_HIGH),
51 81 IRQ_TYPE_SENSE_MASK = 0x0000000f,
52#define IRQ_TYPE_PROBE 0x00000010 /* Probing in progress */ 82
53 83 IRQ_TYPE_PROBE = 0x00000010,
54/* Internal flags */ 84
85 IRQ_LEVEL = (1 << 8),
86 IRQ_PER_CPU = (1 << 9),
87 IRQ_NOPROBE = (1 << 10),
88 IRQ_NOREQUEST = (1 << 11),
89 IRQ_NOAUTOEN = (1 << 12),
90 IRQ_NO_BALANCING = (1 << 13),
91 IRQ_MOVE_PCNTXT = (1 << 14),
92 IRQ_NESTED_THREAD = (1 << 15),
55 93
56#ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT 94#ifndef CONFIG_GENERIC_HARDIRQS_NO_COMPAT
57#define IRQ_INPROGRESS 0x00000100 /* DEPRECATED */ 95 IRQ_INPROGRESS = (1 << 16),
58#define IRQ_REPLAY 0x00000200 /* DEPRECATED */ 96 IRQ_REPLAY = (1 << 17),
59#define IRQ_WAITING 0x00000400 /* DEPRECATED */ 97 IRQ_WAITING = (1 << 18),
60#define IRQ_DISABLED 0x00000800 /* DEPRECATED */ 98 IRQ_DISABLED = (1 << 19),
61#define IRQ_PENDING 0x00001000 /* DEPRECATED */ 99 IRQ_PENDING = (1 << 20),
62#define IRQ_MASKED 0x00002000 /* DEPRECATED */ 100 IRQ_MASKED = (1 << 21),
63/* DEPRECATED use irq_setaffinity_pending() instead*/ 101 IRQ_MOVE_PENDING = (1 << 22),
64#define IRQ_MOVE_PENDING 0x00004000 102 IRQ_AFFINITY_SET = (1 << 23),
65#define IRQ_AFFINITY_SET 0x02000000 /* DEPRECATED */ 103 IRQ_WAKEUP = (1 << 24),
66#endif 104#endif
67 105};
68#define IRQ_LEVEL 0x00008000 /* IRQ level triggered */
69#define IRQ_PER_CPU 0x00010000 /* IRQ is per CPU */
70#define IRQ_NOPROBE 0x00020000 /* IRQ is not valid for probing */
71#define IRQ_NOREQUEST 0x00040000 /* IRQ cannot be requested */
72#define IRQ_NOAUTOEN 0x00080000 /* IRQ will not be enabled on request irq */
73#define IRQ_WAKEUP 0x00100000 /* IRQ triggers system wakeup */
74#define IRQ_NO_BALANCING 0x00400000 /* IRQ is excluded from balancing */
75#define IRQ_MOVE_PCNTXT 0x01000000 /* IRQ migration from process context */
76#define IRQ_NESTED_THREAD 0x10000000 /* IRQ is nested into another, no own handler thread */
77 106
78#define IRQF_MODIFY_MASK \ 107#define IRQF_MODIFY_MASK \
79 (IRQ_TYPE_SENSE_MASK | IRQ_NOPROBE | IRQ_NOREQUEST | \ 108 (IRQ_TYPE_SENSE_MASK | IRQ_NOPROBE | IRQ_NOREQUEST | \