aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/phy.h
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2009-04-25 08:52:51 -0400
committerDavid S. Miller <davem@davemloft.net>2009-04-27 05:53:46 -0400
commitfa94f6d93c5382810ff41f010f12ca8698fc775e (patch)
tree177e38a91f53221e0b15f8b5ed6b0ae66f6ffc52 /include/linux/phy.h
parent4dea547fef1ba23f9d23f5e7f5218187a7dcf1b3 (diff)
phylib: add *_direct() variants of phy_connect and phy_attach functions
Add phy_connect_direct() and phy_attach_direct() functions so that drivers can use a pointer to the phy_device instead of trying to determine the phy's bus_id string. This patch is useful for OF device tree descriptions of phy devices where the driver doesn't need or know what the bus_id value in order to get a phy_device pointer. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> 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.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h
index bf0b5f112dc7..c216e4e503b3 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -447,8 +447,13 @@ struct phy_device* get_phy_device(struct mii_bus *bus, int addr);
447int phy_device_register(struct phy_device *phy); 447int phy_device_register(struct phy_device *phy);
448int phy_clear_interrupt(struct phy_device *phydev); 448int phy_clear_interrupt(struct phy_device *phydev);
449int phy_config_interrupt(struct phy_device *phydev, u32 interrupts); 449int phy_config_interrupt(struct phy_device *phydev, u32 interrupts);
450int phy_attach_direct(struct net_device *dev, struct phy_device *phydev,
451 u32 flags, phy_interface_t interface);
450struct phy_device * phy_attach(struct net_device *dev, 452struct phy_device * phy_attach(struct net_device *dev,
451 const char *bus_id, u32 flags, phy_interface_t interface); 453 const char *bus_id, u32 flags, phy_interface_t interface);
454int phy_connect_direct(struct net_device *dev, struct phy_device *phydev,
455 void (*handler)(struct net_device *), u32 flags,
456 phy_interface_t interface);
452struct phy_device * phy_connect(struct net_device *dev, const char *bus_id, 457struct phy_device * phy_connect(struct net_device *dev, const char *bus_id,
453 void (*handler)(struct net_device *), u32 flags, 458 void (*handler)(struct net_device *), u32 flags,
454 phy_interface_t interface); 459 phy_interface_t interface);