int request_irq(unsigned int irq, void (*handler)(int, struct pt_regs *), unsigned long flags, const char *device);
void free_irq(unsigned int irq);
void enable_irq(unsigned int irq_nr);
void disable_irq(unsigned int irq_nr);
flags is one of 0, SA_INTERRUPT, SA_ONESHOT or SA_PROBE.
0
The interrupt is a slow interrupt. All registers will be saved. The interrupt handler always runs with other interrupts enabled. The handler gets a pointer struct pt_regs * to the processor registers on the stack. After execution of the handler ret_from_syscall is executed, where bottom halves are checked and if necessary exececuted. need_reschedule is checked and the scheduler will be called if set. Signals are checked and handled.
SA_INTERRUPT
The interrupt is a fast interrupt. The handler is running with other interrupts disabled, unless it explicitly enables them. The pointer struct pt_regs * given to the handler will be NULL. There will be no check for signals, need_resched, or bottom halves after execution.
SA_ONESHOT
The interrupt will be disabled after one execution, but the handler will not be discarded.SA_PROBE
Same as SA_ONESHOT. This is used for probe_irq_on() for finding the irq of a device by trial. ( See arch/i386/kernel/irq.c )
device is a string which contains the name of the device.
free_irq() discards the interrupt handler for interrupt irq.
enable_irq() enables the irq with the number irq_nr in the hardware interrupt controller.
disable_irq() disables the irq with the number irq_nr in the hardware interrupt controller.
EBUSY There exists a registered handler for the requested interrupt.