1
2 #ifndef __LINUX_MDIO_BITBANG_H
3 #define __LINUX_MDIO_BITBANG_H
4
5 #include <linux/phy.h>
6
7 struct module;
8
9 struct mdiobb_ctrl;
10
11 struct mdiobb_ops {
12 struct module *owner;
13
14
15
16
17 void (*set_mdc)(struct mdiobb_ctrl *ctrl, int level);
18
19
20
21
22 void (*set_mdio_dir)(struct mdiobb_ctrl *ctrl, int output);
23
24
25
26
27
28 void (*set_mdio_data)(struct mdiobb_ctrl *ctrl, int value);
29
30
31 int (*get_mdio_data)(struct mdiobb_ctrl *ctrl);
32 };
33
34 struct mdiobb_ctrl {
35 const struct mdiobb_ops *ops;
36 };
37
38
39 struct mii_bus *alloc_mdio_bitbang(struct mdiobb_ctrl *ctrl);
40
41
42 void free_mdio_bitbang(struct mii_bus *bus);
43
44 #endif