of_irq_parse_one(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… 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 β€” structure of_phandle_args filled 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 πŸ’œ:

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