of_find_device_by_node(9)
π NAME π
Okay so this is of_find_device_by_node(9) from the Kernel API Manual, bestie β it finds the platform_device associated with a node. Iconic behavior, honestly. π
β¨ SYNOPSIS β¨
struct platform_device * of_find_device_by_node (struct device_node *np
);
πΈ ARGUMENTS πΈ
npβ pointer to a device tree node π¦
π DESCRIPTION π
So this one takes a reference to the embedded struct device β and bestie, that reference needs to be dropped after use. Donβt forget, fr fr ππ
π«Ά RETURN π«Ά
Returns a platform_device pointer, or NULL if not found. Thatβs the whole vibe check πβ¨
π SEE ALSO π
Kernel file ./drivers/of/platform.c plus the whole friend group:
of_device_alloc(9)of_platform_device_create_pdata(9)of_platform_device_create(9)of_platform_bus_create(9)of_platform_bus_probe(9)of_platform_populate(9)of_platform_depopulate(9)devm_of_platform_populate(9)devm_of_platform_depopulate(9)
Big sparkly kiss from ./drivers/of, dated October 2026, signed of_find_device_by_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