Re: [net-next PATCH v2 1/3] net: phy: introduce find_phy_device()

2020-07-01 Thread Andrew Lunn
> +struct phy_device *find_phy_device(struct fwnode_handle *fwnode) We should consider the naming convention. All phylib phy functions start with phy_. We already have phy_find_first(), so maybe phy_find_by_fwnode() to follow the pattern? > +{ > + struct fwnode_handle *fwnode_mdio; > + st

Re: [net-next PATCH v2 1/3] net: phy: introduce find_phy_device()

2020-07-01 Thread Andy Shevchenko
On Wed, Jul 1, 2020 at 9:13 AM Calvin Johnson wrote: > > The PHYs on a mdiobus are probed and registered using mdiobus_register(). > Later, for connecting these PHYs to MAC, the PHYs registered on the > mdiobus have to be referenced. > > For each MAC node, a property "mdio-handle" is used to refer

[net-next PATCH v2 1/3] net: phy: introduce find_phy_device()

2020-06-30 Thread Calvin Johnson
The PHYs on a mdiobus are probed and registered using mdiobus_register(). Later, for connecting these PHYs to MAC, the PHYs registered on the mdiobus have to be referenced. For each MAC node, a property "mdio-handle" is used to reference the MDIO bus on which the PHYs are registered. On getting ho