1REQUEST_THREADED_IRQ(9)    Public Functions Provided   REQUEST_THREADED_IRQ(9)
2
3
4

NAME

6       request_threaded_irq - allocate an interrupt line
7

SYNOPSIS

9       int request_threaded_irq(unsigned int irq, irq_handler_t handler,
10                                irq_handler_t thread_fn,
11                                unsigned long irqflags, const char * devname,
12                                void * dev_id);
13

ARGUMENTS

15       irq
16           Interrupt line to allocate
17
18       handler
19           Function to be called when the IRQ occurs. Primary handler for
20           threaded interrupts If NULL and thread_fn != NULL the default
21           primary handler is installed
22
23       thread_fn
24           Function called from the irq handler thread If NULL, no irq thread
25           is created
26
27       irqflags
28           Interrupt type flags
29
30       devname
31           An ascii name for the claiming device
32
33       dev_id
34           A cookie passed back to the handler function
35

DESCRIPTION

37       This call allocates interrupt resources and enables the interrupt line
38       and IRQ handling. From the point this call is made your handler
39       function may be invoked. Since your handler function must clear any
40       interrupt the board raises, you must take care both to initialise your
41       hardware and to set up the interrupt handler in the right order.
42
43       If you want to set up a threaded irq handler for your device then you
44       need to supply handler and thread_fn.  handler ist still called in hard
45       interrupt context and has to check whether the interrupt originates
46       from the device. If yes it needs to disable the interrupt on the device
47       and return IRQ_WAKE_THREAD which will wake up the handler thread and
48       run thread_fn. This split handler design is necessary to support shared
49       interrupts.
50
51       Dev_id must be globally unique. Normally the address of the device data
52       structure is used as the cookie. Since the handler receives this value
53       it makes sense to use it.
54
55       If your interrupt is shared you must pass a non NULL dev_id as this is
56       required when freeing the interrupt.
57

FLAGS

59       IRQF_SHARED Interrupt is shared IRQF_SAMPLE_RANDOM The interrupt can be
60       used for entropy IRQF_TRIGGER_* Specify active edge(s) or level
61

AUTHORS

63       Thomas Gleixner <tglx@linutronix.de>
64           Author.
65
66       Ingo Molnar <mingo@elte.hu>
67           Author.
68
70Kernel Hackers Manual 2.6.       November 2011         REQUEST_THREADED_IRQ(9)
Impressum