diff options
Diffstat (limited to 'include/linux/of_mdio.h')
| -rw-r--r-- | include/linux/of_mdio.h | 18 | 
1 files changed, 12 insertions, 6 deletions
| diff --git a/include/linux/of_mdio.h b/include/linux/of_mdio.h index 8f2237eb3485..2ab233661ae5 100644 --- a/include/linux/of_mdio.h +++ b/include/linux/of_mdio.h @@ -19,12 +19,17 @@ extern struct phy_device *of_phy_connect(struct net_device *dev,  					 struct device_node *phy_np,  					 void (*hndlr)(struct net_device *),  					 u32 flags, phy_interface_t iface); +extern struct phy_device * +of_phy_get_and_connect(struct net_device *dev, struct device_node *np, +		       void (*hndlr)(struct net_device *));  struct phy_device *of_phy_attach(struct net_device *dev,  				 struct device_node *phy_np, u32 flags,  				 phy_interface_t iface);  extern struct mii_bus *of_mdio_find_bus(struct device_node *mdio_np);  extern int of_mdio_parse_addr(struct device *dev, const struct device_node *np); +extern int of_phy_register_fixed_link(struct device_node *np); +extern bool of_phy_is_fixed_link(struct device_node *np);  #else /* CONFIG_OF */  static inline int of_mdiobus_register(struct mii_bus *mdio, struct device_node *np) @@ -50,6 +55,13 @@ static inline struct phy_device *of_phy_connect(struct net_device *dev,  	return NULL;  } +static inline struct phy_device * +of_phy_get_and_connect(struct net_device *dev, struct device_node *np, +		       void (*hndlr)(struct net_device *)) +{ +	return NULL; +} +  static inline struct phy_device *of_phy_attach(struct net_device *dev,  					       struct device_node *phy_np,  					       u32 flags, phy_interface_t iface) @@ -67,12 +79,6 @@ static inline int of_mdio_parse_addr(struct device *dev,  {  	return -ENOSYS;  } -#endif /* CONFIG_OF */ - -#if defined(CONFIG_OF) && defined(CONFIG_FIXED_PHY) -extern int of_phy_register_fixed_link(struct device_node *np); -extern bool of_phy_is_fixed_link(struct device_node *np); -#else  static inline int of_phy_register_fixed_link(struct device_node *np)  {  	return -ENOSYS; |