devm_of_platform_populate(9)
β¨ devm_of_platform_populate(9) β¨
okay so this is a page from the Kernel API Manual, and honestly? it's a little baddie. it's called devm_of_platform_populate and no cap, it's giving "populate platform_devices from device tree data" β that's literally the NAME section, we're not skipping it π
πΈ SYNOPSIS πΈ
int devm_of_platform_populate (struct device *dev );
like, that's the whole signature. one argument. she's low maintenance. π
π¦ ARGUMENTS π¦
devβ the device that requested to populate from device tree data. like, this is the one asking for the whole thing. the main character of the request, iykyk. π
π DESCRIPTION π
so bestie, here's the tea: this function is similar to of_platform_populate β same vibe, same energy β BUT with a little extra magic sprinkled on top β¨
the difference? it will automatically call of_platform_depopulate when the device is unbound from the bus. like, it cleans up after itself?? we love a self-sufficient icon. no manual teardown needed, she handles it. periodt. π«Ά
π RETURN π
0on success π β we ate, no crumbs< 0on failure π β it's giving flop, go check what went wrong
π₯ SEE ALSO π₯
the whole friend group, fr fr π:
- Kernel file
./drivers/of/platform.cβ the actual source, go read it bestie of_find_device_by_node(9)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_depopulate(9)
π quick vibe check: if you're looking for the non-devmversion, it's right there in SEE ALSO βof_platform_populate(9). this one's the managed one. don't mix them up, bestie, I'm begging π
and that's the page!! mwah π this little writeup lives over in ./drivers/of, dated October 2026, and it's all about devm_of_platform_populate(9) β go forth and populate responsibly, queen πΈππ
π¦ 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