of_irq_parse_one(9)
π of_irq_parse_one(9) π
okay so bestie, welcome to the Kernel API Manual β¨ β yeah, that's the manual we're in, and no, it's not the sexy one, but it is the one that makes interrupts work, so it's kinda main character energy by default. let's get into it π«Ά
β¨ NAME β¨
of_irq_parse_one β literally resolves an interrupt for a device π₯
like, that's the whole job. that's it. that's the vibe check. π
πΈ SYNOPSIS πΈ
int of_irq_parse_one (struct device_node *device , int index , struct
of_phandle_args *out_irq );
okay so she takes three things and gives you back an int, periodt. π
π ARGUMENTS π
deviceβ the device whose interrupt is to be resolved π§ super self-explanatory, she's the one we're getting the interrupt for.indexβ index of the interrupt to resolve π’ yes bestie, there can be more than one, so you gotta say which one. no skipping digits here.out_irqβ structureof_phandle_argsfilled by this function π this bad boy gets filled in by the function, so she's an out-param. she goes in empty-ish and comes out iconic.
π¦ DESCRIPTION π¦
so the way this works is genuinely so satisfying: this function resolves an interrupt for a node by walking the interrupt tree, finding which interrupt controller node it is attached to, and returning the interrupt specifier that can be used to retrieve a Linux IRQ number. β¨
like she literally climbs the tree π finding the controller, grabbing the specifier, handing it to you like "here bestie, this is what you need to get your Linux IRQ number." iykyk. π
π NOTE π
β οΈ refcount of node out_irq->np is increased by 1 on success. β οΈ
not me reminding you again: that's +1 on success, so you better be dropping that reference later or you're gonna have a bad time. no cap, this is the part people forget. ππ«Ά
π SEE ALSO π
the whole friend group, fr fr π:
- Kernel file
./drivers/of/irq.c irq_of_parse_and_map(9)of_irq_find_parent(9)of_irq_parse_raw(9)of_irq_to_resource(9)of_irq_get(9)of_irq_get_byname(9)of_irq_count(9)of_irq_to_resource_table(9)of_irq_init(9)of_msi_xlate(9)of_msi_map_get_device_domain(9)of_msi_get_domain(9)of_msi_configure(9)
like, the entire squad showed up. we love a supportive friend group. πΈπ
β cute lil sign-off β
this page comes to you straight from ./drivers/of π, dated October 2026 π
, and it's all about of_irq_parse_one(9) β go forth and resolve those interrupts, bestie. ππ you got this. mwah. π
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms