Lines Matching refs:handler
70 * IRQ/FIQ initialisation, claim, release and handler routines
141 * int irq_claim(int irq, irqhandler_t *handler)
143 * Enable an IRQ and install a handler for it.
147 irq_claim(int irq, irqhandler_t *handler, const char *group, const char *name)
152 if (handler == NULL)
153 panic("NULL interrupt handler");
154 if (handler->ih_func == NULL)
155 panic("Interrupt handler does not have a function");
163 irq = handler->ih_num;
170 if (handler->ih_level < 0 || handler->ih_level >= NIPL)
174 evcnt_attach_dynamic(&handler->ih_ev, EVCNT_TYPE_INTR, NULL,
177 /* Attach handler at top of chain */
178 handler->ih_next = irqhandlers[irq];
179 irqhandlers[irq] = handler;
182 * Reset the flags for this handler.
183 * As the handler is now in the chain mark it as active.
185 handler->ih_flags = 0 | IRQ_FLAG_ACTIVE;
192 handler->ih_num = irq;
203 * int irq_release(int irq, irqhandler_t *handler)
205 * Disable an IRQ and remove a handler for it.
209 irq_release(int irq, irqhandler_t *handler)
219 irq = handler->ih_num;
225 /* Locate the handler */
229 while (irqhand && handler != irqhand) {
234 /* Remove the handler if located */
240 /* The handler has been removed from the chain so mark it as inactive */
243 /* Make sure the head of the handler list is active */
363 * This routine should be used with caution. A handler should already
382 * Handler for stray interrupts. This gets called if a handler cannot be