Lines Matching refs:irq
116 /* Clear all the IRQ handlers and the irq block masks */
141 * int irq_claim(int irq, irqhandler_t *handler)
147 irq_claim(int irq, irqhandler_t *handler, const char *group, const char *name)
159 * IRQ_INSTRUCT indicates that we should get the irq number
160 * from the irq structure
162 if (irq == IRQ_INSTRUCT)
163 irq = handler->ih_num;
165 /* Make sure the irq number is valid */
166 if (irq < 0 || irq >= NIRQS)
178 handler->ih_next = irqhandlers[irq];
179 irqhandlers[irq] = handler;
192 handler->ih_num = irq;
196 enable_irq(irq);
203 * int irq_release(int irq, irqhandler_t *handler)
209 irq_release(int irq, irqhandler_t *handler)
215 * IRQ_INSTRUCT indicates that we should get the irq number
216 * from the irq structure
218 if (irq == IRQ_INSTRUCT)
219 irq = handler->ih_num;
221 /* Make sure the irq number is valid */
222 if (irq < 0 || irq >= NIRQS)
226 prehand = &irqhandlers[irq];
244 if (irqhandlers[irq])
245 irqhandlers[irq]->ih_flags |= IRQ_FLAG_ACTIVE;
255 if (irqhandlers[irq] == NULL)
256 disable_irq(irq);
273 int irq, level;
278 for (irq = 0; irq < NIRQS; irq++) {
280 for (ptr = irqhandlers[irq]; ptr; ptr = ptr->ih_next)
282 irqlevel[irq] = levels;
288 for (irq = 0; irq < NIRQS; irq++)
289 if (irqlevel[irq] & (1 << level))
290 irqs |= 1 << irq;
310 intr_claim(int irq, int level, int (*ih_func)(void *), void *ih_arg, const char *group, const char *name)
320 if (irq_claim(irq, ih, group, name) != 0) {
342 * void disable_irq(int irq)
344 * Disables a specific irq. The irq is removed from the master irq mask
348 disable_irq(int irq)
353 current_mask &= ~(1 << irq);
360 * void enable_irq(int irq)
362 * Enables a specific irq. The irq is added to the master irq mask
368 enable_irq(int irq)
373 current_mask |= (1 << irq);