summaryrefslogtreecommitdiffstats
path: root/include/linux/mdio.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/mdio.h')
-rw-r--r--include/linux/mdio.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/include/linux/mdio.h b/include/linux/mdio.h
index 4bcb41c71b..c441a074ec 100644
--- a/include/linux/mdio.h
+++ b/include/linux/mdio.h
@@ -13,6 +13,7 @@
#include <linux/types.h>
#include <linux/mii.h>
+#include <init.h>
/* MDIO Manageable Devices (MMDs). */
#define MDIO_MMD_PMAPMD 1 /* Physical Medium Attachment/
@@ -324,4 +325,20 @@ static inline __u16 mdio_phy_id_c45(int prtad, int devad)
return MDIO_PHY_ID_C45 | (prtad << 5) | devad;
}
+#define MDIO_DEVAD_NONE (-1)
+
+struct phy_driver;
+
+int mdio_driver_register(struct phy_driver *drv);
+
+#define mdio_register_driver_macro(level, drv) \
+ static int __init drv##_register(void) \
+ { \
+ return mdio_driver_register(&drv); \
+ } \
+ level##_initcall(drv##_register)
+
+#define device_mdio_driver(drv) \
+ mdio_register_driver_macro(device, drv)
+
#endif /* _UAPI__LINUX_MDIO_H__ */