drivers/irqchip/irqchip.c
Source file repositories/reference/linux-study-clean/drivers/irqchip/irqchip.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/irqchip/irqchip.c- Extension
.c- Size
- 1849 bytes
- Lines
- 61
- Domain
- Driver Families
- Bucket
- drivers/irqchip
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/acpi.hlinux/init.hlinux/of.hlinux/of_irq.hlinux/irqchip.hlinux/platform_device.h
Detected Declarations
function irqchip_initfunction platform_irqchip_probeexport platform_irqchip_probe
Annotated Snippet
#include <linux/acpi.h>
#include <linux/init.h>
#include <linux/of.h>
#include <linux/of_irq.h>
#include <linux/irqchip.h>
#include <linux/platform_device.h>
/*
* This special of_device_id is the sentinel at the end of the
* of_device_id[] array of all irqchips. It is automatically placed at
* the end of the array by the linker, thanks to being part of a
* special section.
*/
static const struct of_device_id
irqchip_of_match_end __used __section("__irqchip_of_table_end");
extern struct of_device_id __irqchip_of_table[];
void __init irqchip_init(void)
{
of_irq_init(__irqchip_of_table);
acpi_probe_device_table(irqchip);
}
int platform_irqchip_probe(struct platform_device *pdev)
{
struct device_node *np = pdev->dev.of_node;
struct device_node *par_np __free(device_node) = of_irq_find_parent(np);
platform_irq_probe_t irq_probe = of_device_get_match_data(&pdev->dev);
if (!irq_probe)
return -EINVAL;
if (par_np == np)
par_np = NULL;
/*
* If there's a parent interrupt controller and none of the parent irq
* domains have been registered, that means the parent interrupt
* controller has not been initialized yet. it's not time for this
* interrupt controller to initialize. So, defer probe of this
* interrupt controller. The actual initialization callback of this
* interrupt controller can check for specific domains as necessary.
*/
if (par_np && !irq_find_matching_host(par_np, DOMAIN_BUS_ANY))
return -EPROBE_DEFER;
return irq_probe(pdev, par_np);
}
EXPORT_SYMBOL_GPL(platform_irqchip_probe);
Annotation
- Immediate include surface: `linux/acpi.h`, `linux/init.h`, `linux/of.h`, `linux/of_irq.h`, `linux/irqchip.h`, `linux/platform_device.h`.
- Detected declarations: `function irqchip_init`, `function platform_irqchip_probe`, `export platform_irqchip_probe`.
- Atlas domain: Driver Families / drivers/irqchip.
- Implementation status: integration implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.