of_irq_get_byname(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… of_irq_get_byname(9) β€” the Kernel API Manual, but make it make sense

okay so bestie, welcome to the of_irq_get_byname(9) page πŸŽ€ this is the Kernel API Manual, and we're about to decode a node's IRQ and get it back as a Linux IRQ number. that's the whole vibe. no cap, it's giving "one job, done correctly." ✨


🌸 NAME 🌸

of_irq_get_byname β€” decode a node's IRQ and return it as a Linux IRQ number πŸ’–

like literally, that's it. you hand it a device tree node and a name, it hands you back an IRQ number. iconic behavior. πŸ‘‘


✨ SYNOPSIS ✨

int of_irq_get_byname (struct device_node *dev , const char *name );

yes the spacing in there is real, we do not touch the spacing, the spacing is sacred 🫢


πŸ¦‹ ARGUMENTS πŸ¦‹

  • dev β€” pointer to device tree node. this is your main character, the node we're reading from 🌈
  • name β€” IRQ name. the label we're looking for, iykyk 🏷️

πŸ”₯ RETURN πŸ”₯

here's the vibe check on what you get back, and every single case matters so pay attention bestie 😭

  • Linux IRQ number on success β€” slay, you got it πŸ’…
  • 0 on the IRQ mapping failure β€” not zero as in "free IRQ," zero as in "the mapping did not happen," do not get it twisted πŸ’€
  • -EPROBE_DEFER if the IRQ domain is not yet created β€” honestly the most relatable return value ever, it's literally "not yet, try again later" 🫠 so yes, you should expect to come back for it
  • error code in case of any other failure β€” some other thing went wrong, and the errno will tell you which πŸ™ˆ
lowkey important: 0 and -EPROBE_DEFER are different things and both are not "success with IRQ zero," so please check your returns properly bestie, I'm begging πŸ₯Ί

⭐ SEE ALSO ⭐

the whole friend group, all of them, no one gets left out 🫢:


and that's the page bestie, go forth and decode those IRQs πŸ’œ

sign-off time: this gem lives in the ./drivers/of source tree, it's part of the Kernel API Manual, and this particular printing is dated October 2026. periodt. πŸŽ€πŸ¦‹πŸ’–

πŸ“¦ where this page comes from