aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/phy.h
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@marvell.com>2008-10-08 19:33:40 -0400
committerDavid S. Miller <davem@davemloft.net>2008-10-08 19:33:40 -0400
commit46abc02175b3c246dd5141d878f565a8725060c9 (patch)
treea777a25a6613b1187244c3bd5a22e451028fccbe /include/linux/phy.h
parent298cf9beb9679522de995e249eccbd82f7c51999 (diff)
phylib: give mdio buses a device tree presence
Introduce the mdio_bus class, and give each 'struct mii_bus' its own 'struct device', so that mii_bus objects are represented in the device tree and can be found by querying the device tree. Signed-off-by: Lennert Buytenhek <buytenh@marvell.com> Acked-by: Andy Fleming <afleming@freescale.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/phy.h')
-rw-r--r--include/linux/phy.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h
index ca4a83c4c537..891f27f9137e 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -100,6 +100,13 @@ struct mii_bus {
100 struct mutex mdio_lock; 100 struct mutex mdio_lock;
101 101
102 struct device *parent; 102 struct device *parent;
103 enum {
104 MDIOBUS_ALLOCATED = 1,
105 MDIOBUS_REGISTERED,
106 MDIOBUS_UNREGISTERED,
107 MDIOBUS_RELEASED,
108 } state;
109 struct device dev;
103 110
104 /* list of all PHYs on bus */ 111 /* list of all PHYs on bus */
105 struct phy_device *phy_map[PHY_MAX_ADDR]; 112 struct phy_device *phy_map[PHY_MAX_ADDR];
@@ -113,6 +120,7 @@ struct mii_bus {
113 */ 120 */
114 int *irq; 121 int *irq;
115}; 122};
123#define to_mii_bus(d) container_of(d, struct mii_bus, dev)
116 124
117#define PHY_INTERRUPT_DISABLED 0x0 125#define PHY_INTERRUPT_DISABLED 0x0
118#define PHY_INTERRUPT_ENABLED 0x80000000 126#define PHY_INTERRUPT_ENABLED 0x80000000