platform_device_set_of_node(9)
π
platform_device_set_of_node π
okay bestie, welcome to the Kernel API Manual page for platform_device_set_of_node. we're folding the manual name in right here at the top instead of doing a boring copy-paste header, and honestly? iconic. π
πΈ NAME πΈ
platform_device_set_of_node β the function that assigns an OF node to a device π¦
β¨ SYNOPSIS β¨
void platform_device_set_of_node (struct platform_device *pdev , struct device_node *np );
π ARGUMENTS π
pdevβ the platform device you're adding the node for π«Άnpβ the new device node β¨
π¦ DESCRIPTION π¦
okay so this one assigns an OF node to this platform device. internally it keeps track of the reference count β no cap, that tracking is part of the vibe. π₯
big important bestie note: devices created with platform_device_alloc must use this function instead of assigning the node manually. don't try to DIY it, okay? π
π¨ and this function must not be called for a platform device that already has a software node as its primary firmware node assigned. that's the hard no. periodt.
π SEE ALSO π
kernel file ./drivers/base/platform.c β and all these friends:
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_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)
kisses bestie, this page is from ./drivers/base, dated October 2026, for platform_device_set_of_node(9) π
π¦ 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