devm_of_platform_populate(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ 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 πŸŽ€

  • 0 on success πŸŽ‰ β€” we ate, no crumbs
  • < 0 on failure 😭 β€” it's giving flop, go check what went wrong

πŸ”₯ SEE ALSO πŸ”₯

the whole friend group, fr fr πŸ’œ:


🌈 quick vibe check: if you're looking for the non-devm version, 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