summaryrefslogtreecommitdiffstats
path: root/drivers/net/phy/phy.c
diff options
context:
space:
mode:
authorOleksij Rempel <o.rempel@pengutronix.de>2022-09-20 14:55:32 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-09-22 11:28:47 +0200
commit8abc2059298d228eefbd851b713c6cb50d6f5e11 (patch)
treeb30807819b062105ea02c65a7720b706b8c2acfc /drivers/net/phy/phy.c
parent5a2f0d141912524c6e39349f53519bd7f77f1e5c (diff)
downloadbarebox-8abc2059298d228eefbd851b713c6cb50d6f5e11.tar.gz
barebox-8abc2059298d228eefbd851b713c6cb50d6f5e11.tar.xz
net: add support for MDIO devices
On the MDIO bus we can have PHYs and some other type of devices. Typical not_PHY MDIO devices do not have easy detectable ID and can't be used as-is by the PHY framework. So, add additional handler to register MDIO devices and drivers alongside with the PHY devices/drivers. Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://lore.barebox.org/20220920125533.2497108-2-o.rempel@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/net/phy/phy.c')
-rw-r--r--drivers/net/phy/phy.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index 60b5839b40..56ec8a28df 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -933,6 +933,8 @@ int phy_driver_register(struct phy_driver *phydrv)
{
phydrv->drv.bus = &mdio_bus_type;
+ phydrv->is_phy = true;
+
if (!phydrv->config_init)
phydrv->config_init = genphy_config_init;