drivers/irqchip/irq-ast2700.c
Source file repositories/reference/linux-study-clean/drivers/irqchip/irq-ast2700.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/irqchip/irq-ast2700.c- Extension
.c- Size
- 2734 bytes
- Lines
- 108
- Domain
- Driver Families
- Bucket
- drivers/irqchip
- Inferred role
- Driver Families: implementation source
- Status
- source 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.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
irq-ast2700.h
Detected Declarations
function Copyright
Annotated Snippet
if (!target_cells || target_cells > IRQ_DOMAIN_IRQ_SPEC_PARAMS) {
of_node_put(target);
return -EINVAL;
}
if (pve - pvs < ASPEED_INTC_RANGE_FIXED_CELLS + target_cells) {
of_node_put(target);
return -EINVAL;
}
r = &ranges->ranges[i];
r->start = be32_to_cpu(pvs[ASPEED_INTC_RANGE_OFF_START]);
r->count = be32_to_cpu(pvs[ASPEED_INTC_RANGE_OFF_COUNT]);
{
struct of_phandle_args args = {
.np = target,
.args_count = target_cells,
};
for (u32 j = 0; j < target_cells; j++)
args.args[j] = be32_to_cpu(pvs[ASPEED_INTC_RANGE_FIXED_CELLS + j]);
of_phandle_args_to_fwspec(target, args.args,
args.args_count,
&r->upstream);
}
of_node_put(target);
r->domain = irq_find_matching_fwspec(&r->upstream, DOMAIN_BUS_ANY);
pvs += ASPEED_INTC_RANGE_FIXED_CELLS + target_cells;
ranges->nranges++;
}
/* Re-fit the range array now we know the entry count */
arr = devm_krealloc_array(dev, ranges->ranges, ranges->nranges,
sizeof(*ranges->ranges), GFP_KERNEL);
if (!arr)
return -ENOMEM;
ranges->ranges = arr;
return 0;
}
Annotation
- Immediate include surface: `irq-ast2700.h`.
- Detected declarations: `function Copyright`.
- Atlas domain: Driver Families / drivers/irqchip.
- Implementation status: source 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.