[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <2dabb0d5-f28f-4fdc-abeb-54119ab1f2cf@lunn.ch>
Date: Fri, 7 Nov 2025 14:14:19 +0100
From: Andrew Lunn <andrew@...n.ch>
To: "Lad, Prabhakar" <prabhakar.csengg@...il.com>
Cc: Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Horatiu Vultur <horatiu.vultur@...rochip.com>,
Geert Uytterhoeven <geert+renesas@...der.be>,
Vladimir Oltean <vladimir.oltean@....com>,
Vadim Fedorenko <vadim.fedorenko@...ux.dev>,
Maxime Chevallier <maxime.chevallier@...tlin.com>,
netdev@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-renesas-soc@...r.kernel.org,
Biju Das <biju.das.jz@...renesas.com>,
Fabrizio Castro <fabrizio.castro.jz@...esas.com>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@...renesas.com>
Subject: Re: [PATCH net-next] net: phy: mscc: Add support for PHY LEDs on
VSC8541
> > > @@ -2343,6 +2532,26 @@ static int vsc85xx_probe(struct phy_device *phydev)
> > > if (!vsc8531->stats)
> > > return -ENOMEM;
> > >
> > > + phy_id = phydev->drv->phy_id & phydev->drv->phy_id_mask;
> > > + if (phy_id == PHY_ID_VSC8541) {
> >
> > The VSC8541 has its own probe function, vsc8514_probe(). Why is this
> > needed?
> >
> vsc85xx_probe() is used for other PHYs along with VSC8541 hence this
> check, vsc8514_probe() is for 8514 PHY.
Ah, sorry. I was looking at 8514, not 8541. So yes, this is needed.
However, i think all the current probe functions could do with some
cleanup. There is a lot of repeated code. That could all be moved into
a vsc85xx_probe_common(), and then a vsc8514_probe() added, which uses
this common function to do most of the work, and then handles LEDs.
Also, is the LED handling you are adding here specific to the 8541? If
you look at the datasheets for the other devices, are any the same?
Andrew
Powered by blists - more mailing lists