__platform_driver_register(9)
π NAME π
okay so bestie, meet __platform_driver_register β the function that registers a driver for platform-level devices β¨ that's literally the whole job description and she ate π
quick vibe check though: the manual name situation is __platform_driver_register(9) from the Kernel API Manual β that (9) is giving kernel-section energy, iykyk π
β¨ SYNOPSIS β¨
int __platform_driver_register (struct platform_driver *drv , struct module *owner , const char *mod_name );
no cap, that's the whole signature β it hands you back an int and takes three args. let's meet them π«Ά
π¦ ARGUMENTS π¦
drvβ the platform driver structure πΈ this is the main character of the whole operation, the actual driver you're putting on the board.ownerβ the owning module/driver π whoever this thing belongs to, that's who goes here.mod_nameβ a module name string β literally just the module name, as a string, no drama.
bestie reminder: those are the exact types from the synopsis βstruct platform_driver *drv,struct module *owner,const char *mod_nameβ don't go freelancing with the args, the compiler is watching π
π₯ SEE ALSO π₯
so like, the source of truth lives in the kernel file ./drivers/base/platform.c π and then there's the whole platform squad β 32 links, and not me listing every single one because they're all iconic in their own way ππ
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_of_node(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_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)
the way the device-side ones and the driver-side ones are all here living their best lives together π§ lowkey obsessed with how organized this list is ngl π
πΈ and that's the page! she's short, she's sweet, she registers platform drivers, periodt π
okay and for the cute sign-off: this lil beauty hangs out under ./drivers/base π and the footer era is October 2026 β so go forth, register responsibly, and remember β __platform_driver_register(9), always in our hearts ππ«Ά
π¦ 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