Re: [PATCH net-next v7 1/7] net: phy: Add swnode support to mdiobus_scan
From: Andrew Lunn
Date: Sat Mar 22 2025 - 11:49:56 EST
On Sat, Mar 22, 2025 at 11:45:52AM +0100, Hans-Frieder Vogt via B4 Relay wrote:
> From: Hans-Frieder Vogt <hfdevel@xxxxxxx>
>
> This patch will allow to use a swnode/fwnode defined for a phy_device. The
> MDIO bus (mii_bus) needs to contain nodes for the PHY devices, named
> "ethernet-phy@i", with i being the MDIO address (0 .. PHY_MAX_ADDR - 1).
>
> The fwnode is only attached to the phy_device if there isn't already an
> fwnode attached.
>
> fwnode_get_named_child_node will increase the usage counter of the fwnode.
> However, no new code is needed to decrease the counter again, since this is
> already implemented in the phy_device_release function.
>
> Signed-off-by: Hans-Frieder Vogt <hfdevel@xxxxxxx>
Reviewed-by: Andrew Lunn <andrew@xxxxxxx>
Andrew