/**
* dm_mdio_phy_connect - Wrapper over phy_connect for DM MDIO
*
- * @dev: mdio dev
- * @addr: PHY address on MDIO bus
+ * @mdiodev: mdio device the PHY is accesible on
+ * @phyaddr: PHY address on MDIO bus
* @ethdev: ethernet device to connect to the PHY
* @interface: MAC-PHY protocol
*
* @return pointer to phy_device, or 0 on error
*/
-struct phy_device *dm_mdio_phy_connect(struct udevice *dev, int addr,
+struct phy_device *dm_mdio_phy_connect(struct udevice *mdiodev, int phyaddr,
struct udevice *ethdev,
phy_interface_t interface);
return 0;
}
-struct phy_device *dm_mdio_phy_connect(struct udevice *dev, int addr,
+struct phy_device *dm_mdio_phy_connect(struct udevice *mdiodev, int phyaddr,
struct udevice *ethdev,
phy_interface_t interface)
{
- struct mdio_perdev_priv *pdata = dev_get_uclass_priv(dev);
+ struct mdio_perdev_priv *pdata = dev_get_uclass_priv(mdiodev);
- if (device_probe(dev))
- return 0;
+ if (device_probe(mdiodev))
+ return NULL;
- return phy_connect(pdata->mii_bus, addr, ethdev, interface);
+ return phy_connect(pdata->mii_bus, phyaddr, ethdev, interface);
}
UCLASS_DRIVER(mdio) = {