STRUCT COMPONENT_MASTER_OPS(9)
π 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 tocomponent_master_add_with_match) are ready π«Ά. Usually there are 3 steps to bind an aggregate driver, and yes we're listing them:
- Allocate a structure for the aggregate driver.
- Bind all the components to the aggregate driver by calling
component_bind_allwith the aggregate driver structure as the opaque pointer data. - 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 underlyingstruct deviceinstances π. Sodevmcannot be used β nope, not even a little β and all resources acquired or allocated in this callback must be explicitly released in theunbindcallback. no cap, this is the part people forget.
unbindβ called when either the aggregate driver (usingcomponent_master_del) or one of its components (usingcomponent_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
- 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