component_m...d_with_match(9)
β¨ NAME β¨
component_master_add_with_match β bestie, this is the one that registers an aggregate driver π (and yes, that's from the Kernel API Manual, iykyk π
)
πΈ SYNOPSIS πΈ
int component_master_add_with_match (struct device *parent , const
const struct component_master_ops *ops , struct component_match *match );
Lowkey the whole thing in one line, no cap:
int component_master_add_with_match(struct device *parent,
const struct component_master_ops *ops,
struct component_match *match);
π ARGUMENTS π
parentβ the parent device of the aggregate driver π«Ά like, the whole vibe's parent, fr fr.opsβ the callbacks for the aggregate driver β¨ this is where the actual behaviour lives.matchβ the component match list for the aggregate driver π literally the guest list.
π¦ DESCRIPTION π¦
Okay so picture this: you're registering a brand-new aggregate driver π and it's made up of the components you added to match by calling one of the component_match_add functions. That's the move. That's it.
Then β the way that this works is genuinely iconic β once all the components in match are available, it gets assembled by calling component_master_ops.bind from ops π« like the universe said "everyone's here, let's go."
β οΈ Important bestie moment: you must unregister it by calling component_master_del. Not optional. Don't leave it hanging, that's not the vibe π
π SEE ALSO π
Kernel file ./drivers/base/component.coverview(9)component_compare_of(9)component_release_of(9)component_compare_dev(9)component_compare_dev_name(9)component_match_add_release(9)component_match_add_typed(9)component_master_del(9)component_unbind_all(9)component_bind_all(9)component_add_typed(9)component_add(9)component_del(9)
Okay that's the whole page, you ate that π mwah π«Ά
This lil masterclass came from ./drivers/base, dated October 2026, and it's living in the Kernel API Manual β periodt. πβ¨
π¦ 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