From: Andrew Lunn <andrew@lunn.ch>
To: "Heiko Stübner" <heiko@sntech.de>
Cc: linux-leds@vger.kernel.org, Marek Vasut <marex@denx.de>,
Christian Marangi <ansuelsmth@gmail.com>,
Conor Dooley <conor+dt@kernel.org>,
Heiner Kallweit <hkallweit1@gmail.com>,
Jacek Anaszewski <jacek.anaszewski@gmail.com>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Lee Jones <lee@kernel.org>, Lukasz Majewski <lukma@denx.de>,
Pavel Machek <pavel@ucw.cz>, Rob Herring <robh@kernel.org>,
devicetree@vger.kernel.org
Subject: Re: [PATCH 1/2] dt-bindings: leds: Document netdev trigger netdev-trigger-mode property
Date: Sat, 9 Aug 2025 18:29:56 +0200 [thread overview]
Message-ID: <505f53fc-3481-497e-bc26-a70f3321e075@lunn.ch> (raw)
In-Reply-To: <2598568.Sgy9Pd6rRy@diego>
> as DT is supposed to be a hardware description, I think throwing arbitary
> binary values around is not very readable - especially as the above would
> be a combination of setting-bits for the TRIGGER_NETDEV_* things.
I tend to agree with you. This is a tricky area, since it does appear
in most part to be configuration, not hardware.
What i think you should actually be describing is the label on the
case next to the LED.
Taking a random example:
https://www.downloads.netgear.com/files/GDC/Unmanaged_Switches/GS105Pv3_GS105PPv3_GS108LP_GS108PP_GS116LP_GS116PP_DS.pdf
The case says:
Left LED: Link/ACT mode
Green = Link at 1000M
Yellow = Link at 10/100M
Blink = ACT
Right: PoE Mode
Green = Powered
Yellow = Fault
So there is in fact four LEDs. Two of them are actually nothing to do
with netdev. This shows how flexible 'PHY' LEDs are, they can in fact
be used for anything. We currently don't have a PoE trigger, but it
should not be too hard to add.
For the two actual netdev LEDs, we need to describe the text of the
label. The naming of the DT property also needs to emphasise this is
the label. And if the case has no label, you should not be putting
properties in DT, the LEDs don't actually have any fixed meaning, it
is user space policy to set them.
As you said, there has not been any obvious progress on such a DT
binding for 6 months or more. I would probably interpret that as its
not particularly important. Maybe it actually makes more sense to work
on user space tools, to make it easier to configure these LEDs. Maybe
extend ethtool with a --get-led and --set-led. It is not always so
easy to following the symlinks in /sys, PHY LEDs appear in a different
place to MAC LEDs typical of switches etc. Once we have ethtool
support, it becomes easier to add entries to /etc/network/interfaces,
or udev rules, etc.
Andrew
next prev parent reply other threads:[~2025-08-09 16:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-13 0:23 [PATCH 1/2] dt-bindings: leds: Document netdev trigger netdev-trigger-mode property Marek Vasut
2025-01-13 0:23 ` [PATCH 2/2] leds: trigger: netdev: Introduce OF mode configuration using " Marek Vasut
2025-01-16 13:47 ` Andrew Lunn
2025-01-21 11:27 ` Marek Vasut
2025-08-07 21:41 ` Heiko Stübner
2025-01-16 13:32 ` [PATCH 1/2] dt-bindings: leds: Document netdev trigger " Andrew Lunn
2025-01-17 16:00 ` Christian Marangi
2025-01-21 0:00 ` Marek Vasut
2025-01-21 11:37 ` Marek Vasut
2025-08-07 10:09 ` Heiko Stübner
2025-08-09 16:29 ` Andrew Lunn [this message]
2025-08-09 19:58 ` Marek Vasut
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=505f53fc-3481-497e-bc26-a70f3321e075@lunn.ch \
--to=andrew@lunn.ch \
--cc=ansuelsmth@gmail.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=heiko@sntech.de \
--cc=hkallweit1@gmail.com \
--cc=jacek.anaszewski@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=lee@kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=lukma@denx.de \
--cc=marex@denx.de \
--cc=pavel@ucw.cz \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).