Function Report

Linux Kernel (v4.4)

Source File:kernel\irq\manage.c Create Date:2016-01-14 10:59:05
Last Modify:2016-01-11 07:01:32 Copyright©Brick
home page Tree
Annotate the kernelChinese

Function Name:request_threaded_irq

Function:int request_threaded_irq(unsigned int irq, irq_handler_t handler, irq_handler_t thread_fn, unsigned long irqflags, const char *devname, void *dev_id)

Return Type:int

Parameter:

Type Parameter NameRemarks
unsigned int irq Interrupt line to allocate
irq_handler_t handler Function to be called when the IRQ occurs.
irq_handler_t thread_fn. This split handler design is necessary to support
unsigned long irqflags Interrupt type flags
const char * devname An ascii name for the claiming device
void * dev_id A cookie passed back to the handler function

Function description: allocate an interrupt line

1623  If Interrupt type flags & allow sharing the irq among several devices && ! A cookie passed back to the handler function || !( Interrupt type flags & allow sharing the irq among several devices) && Interrupt type flags & If the IRQ is shared with a NO_SUSPEND user || Interrupt type flags & Do not disable this IRQ during suspend && Interrupt type flags & If the IRQ is shared with a NO_SUSPEND user then Returning -Invalid argument
1626  Interrupt descriptor = Interrupt to descriptor
1627  If !Interrupt descriptor then Returning -Invalid argument
1631  If !irq_settings_can_request(Interrupt descriptor) || WARN_ON then Returning -Invalid argument
1634  If ! Function to be called when the IRQ occurs. then
1635  If !. This split handler design is necessary to support then Returning -Invalid argument
1637  Function to be called when the IRQ occurs. = Default primary interrupt handler for threaded interrupts
1640  action = allocate memory. The memory is set to zero.
1641  If !action then Returning -Out of memory
1644  interrupt handler function = Function to be called when the IRQ occurs.
1645  interrupt handler function for threaded interrupts = . This split handler design is necessary to support
1646  flags(see IRQF_* above) = Interrupt type flags
1647  name of the device = An ascii name for the claiming device
1648  cookie to identify the device = A cookie passed back to the handler function
1650  Inline functions for support of irq chips on slow busses
1651  register an interrupt
1652  chip_bus_sync_unlock(Interrupt descriptor)
1654  If result of register an interrupt then
1655  kfree( pointer to secondary irqaction(force threading))
1656  kfree(action)
1678  Returning result of register an interrupt
Caller
Function NameFunction description
request_irqrequest a new interrupt
request_any_context_irq allocate an interrupt line
devm_request_threaded_irq allocate an interrupt line for a managed device