Blame view
include/linux/component.h
1.33 KB
2a41e6070
|
1 2 |
#ifndef COMPONENT_H #define COMPONENT_H |
ce657b1cd
|
3 |
#include <linux/stddef.h> |
2a41e6070
|
4 5 6 |
struct device; struct component_ops { |
ce657b1cd
|
7 8 9 10 |
int (*bind)(struct device *comp, struct device *master, void *master_data); void (*unbind)(struct device *comp, struct device *master, void *master_data); |
2a41e6070
|
11 12 13 14 |
}; int component_add(struct device *, const struct component_ops *); void component_del(struct device *, const struct component_ops *); |
ce657b1cd
|
15 16 |
int component_bind_all(struct device *master, void *master_data); void component_unbind_all(struct device *master, void *master_data); |
2a41e6070
|
17 18 19 20 |
struct master; struct component_master_ops { |
ce657b1cd
|
21 22 |
int (*bind)(struct device *master); void (*unbind)(struct device *master); |
2a41e6070
|
23 |
}; |
2a41e6070
|
24 25 |
void component_master_del(struct device *, const struct component_master_ops *); |
6955b5825
|
26 27 28 29 |
struct component_match; int component_master_add_with_match(struct device *, const struct component_master_ops *, struct component_match *); |
ce657b1cd
|
30 31 32 |
void component_match_add_release(struct device *master, struct component_match **matchptr, void (*release)(struct device *, void *), |
6955b5825
|
33 |
int (*compare)(struct device *, void *), void *compare_data); |
ce657b1cd
|
34 35 36 37 38 39 40 |
static inline void component_match_add(struct device *master, struct component_match **matchptr, int (*compare)(struct device *, void *), void *compare_data) { component_match_add_release(master, matchptr, NULL, compare, compare_data); } |
2a41e6070
|
41 |
#endif |