Lines Matching refs:component

43 struct component;
50 struct component *component; member
69 struct component { struct
102 struct component *component = match->compare[i].component; in component_devices_show() local
105 component ? dev_name(component->dev) : "(unknown)", in component_devices_show()
106 component ? (component->bound ? "bound" : "not bound") : "not registered"); in component_devices_show()
157 static struct component *find_component(struct master *master, in find_component()
160 struct component *c; in find_component()
189 struct component *c; in find_components()
193 if (match->compare[i].component) in find_components()
206 match->compare[i].component = c; in find_components()
213 static void remove_component(struct master *master, struct component *c) in remove_component()
219 if (master->match->compare[i].component == c) in remove_component()
220 master->match->compare[i].component = NULL; in remove_component()
231 struct component *component) in try_to_bring_up_master() argument
242 if (component && component->master != master) { in try_to_bring_up_master()
244 dev_name(component->dev)); in try_to_bring_up_master()
265 static int try_to_bring_up_masters(struct component *component) in try_to_bring_up_masters() argument
272 ret = try_to_bring_up_master(m, component); in try_to_bring_up_masters()
367 match->compare[match->num].component = NULL; in __component_match_add()
437 struct component *c = match->compare[i].component; in free_master()
518 static void component_unbind(struct component *component, in component_unbind() argument
521 WARN_ON(!component->bound); in component_unbind()
523 if (component->ops && component->ops->unbind) in component_unbind()
524 component->ops->unbind(component->dev, master->parent, data); in component_unbind()
525 component->bound = false; in component_unbind()
528 devres_release_group(component->dev, component); in component_unbind()
543 struct component *c; in component_unbind_all()
555 c = master->match->compare[i].component; in component_unbind_all()
561 static int component_bind(struct component *component, struct master *master, in component_bind() argument
579 if (!devres_open_group(component->dev, component, GFP_KERNEL)) { in component_bind()
585 dev_name(component->dev), component->ops); in component_bind()
587 ret = component->ops->bind(component->dev, master->parent, data); in component_bind()
589 component->bound = true; in component_bind()
597 devres_close_group(component->dev, NULL); in component_bind()
601 dev_name(component->dev), component->ops); in component_bind()
603 devres_release_group(component->dev, NULL); in component_bind()
608 dev_name(component->dev), component->ops, ret); in component_bind()
626 struct component *c; in component_bind_all()
639 c = master->match->compare[i].component; in component_bind_all()
648 c = master->match->compare[i - 1].component; in component_bind_all()
660 struct component *component; in __component_add() local
663 component = kzalloc(sizeof(*component), GFP_KERNEL); in __component_add()
664 if (!component) in __component_add()
667 component->ops = ops; in __component_add()
668 component->dev = dev; in __component_add()
669 component->subcomponent = subcomponent; in __component_add()
674 list_add_tail(&component->node, &component_list); in __component_add()
676 ret = try_to_bring_up_masters(component); in __component_add()
678 if (component->master) in __component_add()
679 remove_component(component->master, component); in __component_add()
680 list_del(&component->node); in __component_add()
682 kfree(component); in __component_add()
750 struct component *c, *component = NULL; in component_del() local
756 component = c; in component_del()
760 if (component && component->master) { in component_del()
761 take_down_master(component->master); in component_del()
762 remove_component(component->master, component); in component_del()
767 WARN_ON(!component); in component_del()
768 kfree(component); in component_del()