platform_device_set_fwnode(9)
π platform_device_set_fwnode(9)
okay so bestie, welcome to the Kernel API Manual β yes that's the manual name, no it's not a vibe, it's a whole reference library and we're living in it now π«Ά
β¨ NAME β¨
platform_device_set_fwnode β the function that assigns a firmware node to a device, and honestly? it's giving matchmaker energy π₯
πΈ SYNOPSIS πΈ
void platform_device_set_fwnode (struct platform_device *pdev , struct
fwnode_handle *fwnode );
like, look at that signature. void return, so it hands you nothing back β it just does the thing and dips π
π ARGUMENTS π
pdevβ the platform device you're setting the node for. yeah. that one. your fave platform device πfwnodeβ the new firmware node you're blessing it with β¨
π¦ DESCRIPTION π¦
okay so the whole point: you assign a firmware node to this platform device. that's it, that's the plot π¬
but here's the tea β internally it keeps track of the reference count for you. like a responsible bestie who remembers who owes whom π§Ύ
β οΈ big one: devices created with platform_device_alloc must use this function instead of assigning the node manually. no DIY shortcuts, no "I'll just do it myself real quick", none of that. use the function. periodt π
π also very serious: this function must not be called for a platform device that already has a software node as its primary firmware node assigned. like, don't. it's not a vibe. that's the one rule and we respect it π
π SEE ALSO π
Kernel file ./drivers/base/platform.c β the source file, the mothership π and its whole friend group:
platform_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_get_irq_byname_optional(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_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 whole page, bestie, you ate it π
β¨ signing off from ./drivers/base β dated October 2026 β version platform_device_set_fwnode(9), no cap π«Άπ
π¦ 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