STRUCT COMPONENT_MASTER_OPS(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸŽ€ struct component_master_ops(9) πŸŽ€

okay bestie, welcome to the Kernel API Manual β€” this one's all about struct component_master_ops, the callback squad for your aggregate driver ✨


✨ NAME ✨

struct component_master_ops β€” literally the callbacks for the aggregate driver πŸ’…


🌸 SYNOPSIS 🌸

struct component_master_ops {
    int (*bind)(struct device *master);
    void (*unbind)(struct device *master);
 };

πŸ’– Members πŸ’–

  • bind β€” called when all the components or the aggregate driver (as specified in the match list you passed to component_master_add_with_match) are ready 🫢. Usually there are 3 steps to bind an aggregate driver, and yes we're listing them:
  1. Allocate a structure for the aggregate driver.
  2. Bind all the components to the aggregate driver by calling component_bind_all with the aggregate driver structure as the opaque pointer data.
  3. Register the aggregate driver with the subsystem so it can publish its interfaces.
⚠️ heads up bestie: the lifetime of the aggregate driver does not align with any of the underlying struct device instances 😭. So devm cannot be used β€” nope, not even a little β€” and all resources acquired or allocated in this callback must be explicitly released in the unbind callback. no cap, this is the part people forget.
  • unbind β€” called when either the aggregate driver (using component_master_del) or one of its components (using component_del) is unregistered 🌈

πŸ¦‹ Description πŸ¦‹

Aggregate drivers are registered with component_master_add_with_match and unregistered with component_master_del. that's it, that's the whole vibe πŸ’«


πŸ”₯ SEE ALSO πŸ”₯

Kernel file ./include/linux/component.h, struct component_ops(9), component_match_add(9) πŸ‘‘


that's the whole page, periodt πŸ§šπŸ’œ β€” signing off from ./include/linux, October 2026, struct component_master_ops(9) πŸ’Œ

πŸ“¦ where this page comes from