Re: [PATCH net-next v4 0/8] net: Add generic support for netdev LEDs

Vladimir Oltean
2024-06-26T12:16:09Z

Hi Andrew,

On Sat, Apr 06, 2024 at 03:13:27PM -0500, Andrew Lunn wrote:
> For some devices, the MAC controls the LEDs in the RJ45 connector, not
> the PHY. This patchset provides generic support for such LEDs, and
> adds the first user, mv88e6xxx.
>
> The common code netdev_leds_setup() is passed a DT node containing the
> LEDs and a structure of operations to act on the LEDs. The core will
> then create an cdev LED for each LED found in the device tree node.
>
> The callbacks are passed the netdev, and the index of the LED. In
> order to make use of this within DSA, helpers are added to convert a
> netdev to a ds and port.
>
> The mv88e6xxx has been extended to add basic support for the 6352
> LEDs. Only software control is added, but the API supports hardware
> offload which can be added to the mv88e6xxx driver later.
>
> For testing and demonstration, the Linksys Mamba aka. wrt1900ac has
> the needed DT nodes added to describe its LEDs.
>
> Signed-off-by: Andrew Lunn <andrew@lunn.ch>
> ---

I stumbled across a circumstance today where it would have been useful
if the netdev on user ports was created at ds->ops->port_setup() time.
It is something that this series accomplishes, but I think it got stuck
here. Do you plan to resend it, or is there any blocking issue?