Re: [PATCH net-next 1/4] net: mdio: Introduce a regmap-based mdio driver
From: Vladimir Oltean
Date: Wed May 24 2023 - 13:42:00 EST
On Wed, May 24, 2023 at 07:30:51PM +0200, Andrew Lunn wrote:
> > + mii->name = DRV_NAME;
> > + strscpy(mii->id, config->name, MII_BUS_ID_SIZE);
> > + mii->parent = config->parent;
> > + mii->read = mdio_regmap_read_c22;
> > + mii->write = mdio_regmap_write_c22;
>
> Since there is only one valid address on the bus, you can set
> mii->phy_mask to make the scanning of the bus a little faster.
Sorry, I didn't reach this thread yet, I don't have the full context.
Just wanted to add: if the caller knows that there's only a PCS and not
a PHY on this bus, you don't want auto-scanning at all, since that will
create an unconnected phy_device. It would be good if the caller provided
the phy_mask.