platform_device_add(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ platform_device_add(9) β€” Kernel API Manual ✨

πŸ’– NAME πŸ’–

okay so platform_device_add is literally the function that adds a platform device to the device hierarchy. That’s the whole vibe: putting pdev where it belongs in the device tree, bestie. πŸ¦‹

🌸 SYNOPSIS 🌸

int platform_device_add (struct platform_device *pdev );

πŸŽ€ ARGUMENTS πŸŽ€

  • pdev β€” the platform device we’re adding. That’s the main character here. πŸ‘‘

πŸ’… DESCRIPTION πŸ’…

This one is part 2 of platform_device_register, periodt. But it can also be called separately β€” and we mean iff β€” like, only if β€” pdev was allocated by platform_device_alloc, no cap. So don’t just roll up with some random pdev and expect this to work; the allocation situation matters. πŸ’€

πŸ¦‹ SEE ALSO πŸ¦‹

Okay bestie, here’s the whole friend group. The kernel file is ./drivers/base/platform.c, and these pages are all linked from there:


mwah πŸ’‹ cute little sign-off: source ./drivers/base, date October 2026, page platform_device_add(9) β€” and that’s the footer, bestie, we’re done! πŸ’œπŸŽ€

πŸ“¦ where this page comes from