1<html><head><meta http-equiv="Content-Type" content="text/html; charset=ANSI_X3.4-1968"><title>request_any_context_irq</title><meta name="generator" content="DocBook XSL Stylesheets V1.78.1"><link rel="home" href="index.html" title="Linux generic IRQ handling"><link rel="up" href="pubfunctions.html" title="Chapter 9. Public Functions Provided"><link rel="prev" href="API-request-threaded-irq.html" title="request_threaded_irq"><link rel="next" href="API-irq-set-chip.html" title="irq_set_chip"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center"><span class="phrase">request_any_context_irq</span></th></tr><tr><td width="20%" align="left"><a accesskey="p" href="API-request-threaded-irq.html">Prev</a> </td><th width="60%" align="center">Chapter 9. Public Functions Provided</th><td width="20%" align="right"> <a accesskey="n" href="API-irq-set-chip.html">Next</a></td></tr></table><hr></div><div class="refentry"><a name="API-request-any-context-irq"></a><div class="titlepage"></div><div class="refnamediv"><h2>Name</h2><p>request_any_context_irq — 2 allocate an interrupt line 3 </p></div><div class="refsynopsisdiv"><h2>Synopsis</h2><div class="funcsynopsis"><table border="0" class="funcprototype-table" summary="Function synopsis" style="cellspacing: 0; cellpadding: 0;"><tr><td><code class="funcdef">int <b class="fsfunc">request_any_context_irq </b>(</code></td><td>unsigned int <var class="pdparam">irq</var>, </td></tr><tr><td> </td><td>irq_handler_t <var class="pdparam">handler</var>, </td></tr><tr><td> </td><td>unsigned long <var class="pdparam">flags</var>, </td></tr><tr><td> </td><td>const char * <var class="pdparam">name</var>, </td></tr><tr><td> </td><td>void * <var class="pdparam">dev_id</var><code>)</code>;</td></tr></table><div class="funcprototype-spacer"> </div></div></div><div class="refsect1"><a name="idp1103200916"></a><h2>Arguments</h2><div class="variablelist"><dl class="variablelist"><dt><span class="term"><em class="parameter"><code>irq</code></em></span></dt><dd><p> 4 Interrupt line to allocate 5 </p></dd><dt><span class="term"><em class="parameter"><code>handler</code></em></span></dt><dd><p> 6 Function to be called when the IRQ occurs. 7 Threaded handler for threaded interrupts. 8 </p></dd><dt><span class="term"><em class="parameter"><code>flags</code></em></span></dt><dd><p> 9 Interrupt type flags 10 </p></dd><dt><span class="term"><em class="parameter"><code>name</code></em></span></dt><dd><p> 11 An ascii name for the claiming device 12 </p></dd><dt><span class="term"><em class="parameter"><code>dev_id</code></em></span></dt><dd><p> 13 A cookie passed back to the handler function 14 </p></dd></dl></div></div><div class="refsect1"><a name="idp1103206572"></a><h2>Description</h2><p> 15 This call allocates interrupt resources and enables the 16 interrupt line and IRQ handling. It selects either a 17 hardirq or threaded handling method depending on the 18 context. 19 </p><p> 20 21 On failure, it returns a negative value. On success, 22 it returns either IRQC_IS_HARDIRQ or IRQC_IS_NESTED. 23</p></div></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="API-request-threaded-irq.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="pubfunctions.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="API-irq-set-chip.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top"><span class="phrase">request_threaded_irq</span> </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> <span class="phrase">irq_set_chip</span></td></tr></table></div></body></html> 24