aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/phy.h
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2019-01-15 15:09:35 -0800
committerDavid S. Miller <davem@davemloft.net>2019-01-17 11:33:17 -0800
commit5db5ea995fc2fa89fdef61ef3a658cbb41a24222 (patch)
tree40a03d361a142c94297fcd3c9471857b760ea27b /include/linux/phy.h
parentMerge branch 'dsa-Split-platform-data-to-header-file' (diff)
downloadlinux-dev-5db5ea995fc2fa89fdef61ef3a658cbb41a24222.tar.xz
linux-dev-5db5ea995fc2fa89fdef61ef3a658cbb41a24222.zip
net: phy: Add helpers to determine if PHY driver is generic
We are already checking in phy_detach() that the PHY driver is of generic kind (1G or 10G) and we are going to make use of that in the SFP layer as well for 1000BaseT SFP modules, so expose helper functions to return that information. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/phy.h')
-rw-r--r--include/linux/phy.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/phy.h b/include/linux/phy.h
index 3b051f761450..f1c19bf8c658 100644
--- a/include/linux/phy.h
+++ b/include/linux/phy.h
@@ -1183,4 +1183,7 @@ module_exit(phy_module_exit)
#define module_phy_driver(__phy_drivers) \
phy_module_driver(__phy_drivers, ARRAY_SIZE(__phy_drivers))
+bool phy_driver_is_genphy(struct phy_device *phydev);
+bool phy_driver_is_genphy_10g(struct phy_device *phydev);
+
#endif /* __PHY_H */