of_irq_get_byname(9)
π 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 π
0on the IRQ mapping failure β not zero as in "free IRQ," zero as in "the mapping did not happen," do not get it twisted π-EPROBE_DEFERif 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:0and-EPROBE_DEFERare 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 π«Ά:
- Kernel file
./drivers/of/irq.c irq_of_parse_and_map(9)of_irq_find_parent(9)of_irq_parse_raw(9)of_irq_parse_one(9)of_irq_to_resource(9)of_irq_get(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)
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
- 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