1 /* SPDX-License-Identifier: GPL-2.0 */
5 #include <linux/stddef.h>
10 int (*bind)(struct device *comp, struct device *master,
12 void (*unbind)(struct device *comp, struct device *master,
16 int component_add(struct device *, const struct component_ops *);
17 void component_del(struct device *, const struct component_ops *);
19 int component_bind_all(struct device *master, void *master_data);
20 void component_unbind_all(struct device *master, void *master_data);
24 struct component_master_ops {
25 int (*bind)(struct device *master);
26 void (*unbind)(struct device *master);
29 void component_master_del(struct device *,
30 const struct component_master_ops *);
32 struct component_match;
34 int component_master_add_with_match(struct device *,
35 const struct component_master_ops *, struct component_match *);
36 void component_match_add_release(struct device *master,
37 struct component_match **matchptr,
38 void (*release)(struct device *, void *),
39 int (*compare)(struct device *, void *), void *compare_data);
41 static inline void component_match_add(struct device *master,
42 struct component_match **matchptr,
43 int (*compare)(struct device *, void *), void *compare_data)
45 component_match_add_release(master, matchptr, NULL, compare,