Subject: Re: lets settle the LED `function` property regarding the netdev trigger

From: Andrew Lunn <[email-masked]>
Date: Tue, 5 Oct 2021 23:01:18 +0200

> In the discussed case (ethernet PHY LEDs) - it is sometimes possible to
> have multiple brightness levels per color channel. For example some
> Marvell PHYs allow to set 8 levels of brightness for Dual Mode LEDs.
> Dual Mode is what Marvell calls when the PHY allows to pair two
> LED pins to control one dual-color LED (green-red, for example) into
> one.
> 
> Moreover for this Dual Mode case they also allow for HW control of
> this dual LED, which, when enabled, does something like this, in HW:
>   1g link	green
>   100m link	yellow
>   10m link	red
>   no link	off
> 
> Note that actual colors depend on the LEDs themselves. The PHY
> documentation does not talk about the color, only about which pin is
> on/off. The thing is that if we want to somehow set this mode for the
> LED, it should be represented as one LED class device.
> 
> I want to extend the netdev trigger to support such configuration,
> so that when you have multicolor LED, you will be able to say which
> color should be set for which link mode.

This is getting into the exotic level i don't think we need to
support. How many PHYs have you seen that support something like this?

I suggest we start with simple independent LEDs. That gives enough to
support the majority of use cases people actually need. And is enough
to unblock people who i keep NACKing patches and tell them to wait for
this work to get merged.

     Andrew