summaryrefslogtreecommitdiff
path: root/include/linux/of_mdio.h
diff options
context:
space:
mode:
authorDongpo Li <lidongpo@hisilicon.com>2016-07-15 11:26:34 +0300
committerDavid S. Miller <davem@davemloft.net>2016-07-17 07:32:58 +0300
commitb786241253041c13d94309ca4dace301833f63d1 (patch)
treebb7912b438cebc673cfa03b09ec65e7836302707 /include/linux/of_mdio.h
parent4960e4b1e69908ee70c716755a9415079e0d554f (diff)
downloadlinux-b786241253041c13d94309ca4dace301833f63d1.tar.xz
of_mdio: Abstract a general interface for phy connect
Abstract a general interface "of_phy_get_and_connect" for PHY connect. User will have no bother with getting "phy-mode" and "phy-handle" any more. Suggested-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Dongpo Li <lidongpo@hisilicon.com> Reviewed-by: Jiancheng Xue <xuejiancheng@hisilicon.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/of_mdio.h')
-rw-r--r--include/linux/of_mdio.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/linux/of_mdio.h b/include/linux/of_mdio.h
index 4b04587d0441..2ab233661ae5 100644
--- a/include/linux/of_mdio.h
+++ b/include/linux/of_mdio.h
@@ -19,6 +19,9 @@ 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);
@@ -52,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)