platform_get...ame_optional(9)
π platform_get_irq_byname_optional π
okay bestie, welcome to the Kernel API Manual β¨ this one's a lil page from the kernel docs, platform_get_irq_byname_optional(9), and honestly? she's the chill, no-drama sibling of the IRQ getters. let's get into it π
πΈ NAME πΈ
platform_get_irq_byname_optional β get an optional IRQ for a device by name π¦
like, she fetches an IRQ by name, but she's optional about it. lowkey the whole personality.
β¨ SYNOPSIS β¨
int platform_get_irq_byname_optional (struct platform_device *dev ,
const char *name );
that's the whole signature, no cap π₯
π«Ά ARGUMENTS π«Ά
devβ the platform device π» like, the device we're asking aboutnameβ the IRQ name π·οΈ the string we're looking the IRQ up by
π DESCRIPTION π
so here's the tea β: this one gets an optional IRQ by name, and honestly it works just like platform_get_irq_byname. same energy, same lookup.
but! the one difference β and this is the moment, this is her main character trait β she does not print an error message if an IRQ can not be obtained π€«π
fr fr, if the IRQ isn't there, she just... doesn't complain. no error spam in your dmesg. iconic behaviour, honestly. some of y'all need to learn this.
π RETURN π
- non-zero IRQ number on success π (yay, we got one)
- negative error number on failure π (aw, didn't get one β but remember, no error message gets printed!)
π SEE ALSO π
the whole squad, gathered for your convenience π«Ά and yes, they're all here, every single one:
Kernel file ./drivers/base/platform.cplatform_get_resource(9)devm_platform_get_and_ioremap_resource(9)devm_platform_ioremap_resource(9)devm_platform_ioremap_resource_byname(9)platform_get_irq_affinity(9)platform_get_irq_optional(9)platform_get_irq(9)platform_irq_count(9)devm_platform_get_irqs_affinity(9)platform_get_resource_byname(9)platform_get_irq_byname(9)platform_add_devices(9)platform_device_put(9)platform_device_alloc(9)platform_device_add_resources(9)platform_device_add_data(9)platform_device_set_of_node(9)platform_device_set_fwnode(9)platform_device_set_of_node_from_dev(9)platform_device_add(9)platform_device_del(9)platform_device_register(9)platform_device_unregister(9)platform_device_register_full(9)__platform_driver_register(9)platform_driver_unregister(9)__platform_driver_probe(9)__platform_create_bundle(9)__platform_register_drivers(9)platform_unregister_drivers(9)platform_match(9)platform_find_device_by_driver(9)
that's the full roster, go read some more if you're obsessed π§π
aaaand that's the page bestie!! π this lil gem lives in ./drivers/base and the version on deck is dated October 2026 β so yeah, fresh off the presses π mwah, go forth and grab those optional IRQs π
β¨
π¦ 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