Re: [PATCH 06/12] net: phy: add phy_device_atomic_register helper

From: Marco Felsch
Date: Wed Apr 05 2023 - 11:23:41 EST


On 23-04-05, Andrew Lunn wrote:
> > To bundle the phy firmware parsing step within phx_device.c the commit
> > copies the required code from fwnode_mdio.c. After we converterd all
> > callers of fwnode_mdiobus_* to this new API we can remove the support
> > from fwnode_mdio.c.
>
> Why bundle the code? Why not call it in fwnode_mdio.c?

The current fwnode_mdio.c don't provide the proper helper functions yet.
Instead the parsing is spread between fwnode_mdiobus_register_phy() and
fwnode_mdiobus_phy_device_register(). Of course these can be extracted
and exported but I don't see the benefit. IMHO it just cause jumping
around files and since fwnode is a proper firmware abstraction we could
use is directly wihin core/lib files.

> The bundling in this patch makes it harder to see the interesting part
> of this patch, how the reset is handled. That is what this whole
> patchset is about, so you want the review focus to be on that.

I know and I thought about adding the firmware parsing helpers first but
than I went this way. I can split this of course to make the patch
smaller.

Regards,
Marco


>
> Andrew
>