summaryrefslogtreecommitdiffstats
path: root/include/linux/component.h
blob: 68870182ca1ea7920f99be7661216b1d12e64095 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#ifndef COMPONENT_H
#define COMPONENT_H

struct device;

struct component_ops {
	int (*bind)(struct device *, struct device *, void *);
	void (*unbind)(struct device *, struct device *, void *);
};

int component_add(struct device *, const struct component_ops *);
void component_del(struct device *, const struct component_ops *);

int component_bind_all(struct device *, void *);
void component_unbind_all(struct device *, void *);

struct master;

struct component_master_ops {
	int (*add_components)(struct device *, struct master *);
	int (*bind)(struct device *);
	void (*unbind)(struct device *);
};

int component_master_add(struct device *, const struct component_master_ops *);
void component_master_del(struct device *,
	const struct component_master_ops *);

int component_master_add_child(struct master *master,
	int (*compare)(struct device *, void *), void *compare_data);

#endif
OpenPOWER on IntegriCloud