__platform_register_drivers(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

✨ __platform_register_drivers(9) ✨

Okay so bestie, this is a page from the Kernel API Manual, and we're about to get into it. Buckle up, because this function is literally the group-chat admin of platform drivers β€” it adds a whole squad at once. 🫢


🌸 NAME 🌸

__platform_register_drivers β€” register an array of platform drivers


πŸŽ€ SYNOPSIS πŸŽ€

int __platform_register_drivers (struct platform_driver * const *drivers
, unsigned int count , struct module *owner , const char *mod_name );

πŸ’… ARGUMENTS πŸ’…

  • drivers β€” an array of drivers to register. Like, the whole friend group you're adding to the party. πŸ‘―β€β™€οΈ
  • count β€” the number of drivers to register. Yes, you literally have to tell it how many besties are showing up. ✨
  • owner β€” module owning the drivers. The main character module, iykyk. πŸ‘‘
  • mod_name β€” module name string. Just a cute little string with the name on it. 🏷️

πŸ¦‹ DESCRIPTION πŸ¦‹

Registers platform drivers specified by an array. That's the vibe.

On failure to register a driver, all previously registered drivers will be unregistered β€” so it's giving "if one of us can't get in, none of us are going in," no cap. 😭 Lowkey iconic loyalty, tbh.

Callers of this API should use platform_unregister_drivers to unregister drivers in the reverse order. Fr fr, reverse order, don't skip that part. πŸ”„


⭐ RETURN ⭐

0 on success, or a negative error code on failure. Simple as that, bestie. πŸ’–


🌈 SEE ALSO 🌈

Okay this list is long and honestly highkey iconic β€” the whole extended family is here. Kernel file ./drivers/base/platform.c, plus literally this entire roster:

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_register(9), platform_driver_unregister(9), __platform_driver_probe(9), __platform_create_bundle(9), platform_unregister_drivers(9), platform_match(9), platform_find_device_by_driver(9)

Like I said. The whole crew. πŸ«‚


Lowkey a reminder: this page lives at ./drivers/base, dated October 2026, and it's manual page __platform_register_drivers(9). Slay. πŸ’œ
πŸ“¦ where this page comes from