Thread (17 messages) flat view 17 messages, 3 authors, 2021-10-07

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

From: Andrew Lunn <andrew@lunn.ch>
Date: 2021-10-05 21:01:26
Also in: linux-leds, lkml, netdev

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


Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help