From: Andrew Lunn <andrew@lunn.ch>
To: Paul Louvel <paul.louvel@bootlin.com>
Cc: Vladimir Oltean <olteanv@gmail.com>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>, Frank Li <Frank.Li@nxp.com>,
Jerry Ray <jerry.ray@microchip.com>,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, Bo Mellberg <bo.mellberg@se.com>,
Pascal Eberhard <pascal.eberhard@se.com>,
Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
Miquel Raynal <miquel.raynal@bootlin.com>
Subject: Re: [PATCH net-next 3/3] net: dsa: lan9303: add LED mode configuration
Date: Thu, 26 Nov 2026 16:04:57 +0100 [thread overview]
Message-ID: <4d2a5db3-2829-4383-8f8d-05cf7c94fddc@lunn.ch> (raw)
In-Reply-To: <20261126-lan9303-leds-v1-3-a96731317859@bootlin.com>
On Thu, Nov 26, 2026 at 03:13:45PM +0100, Paul Louvel wrote:
> The LED function of the LAN9303 and LAN9354 is selected by a single
> LED_FUN field that applies to all six LED pins of the two external
> ports.
>
> On some boards the LED straps double as configuration straps for other
> functions, such as the PHY address or the EEPROM size, so the desired
> LED mode cannot be strapped and has to be programmed by the driver.
>
> The LED subsystem is not used here: it models each LED independently,
> while this hardware has one function field for all LEDs.
Ah. This should of been in the cover letter...
[Goes and looks at the data sheet]
https://ww1.microchip.com/downloads/aemDocuments/documents/OTH/ProductDocuments/DataSheets/00002308A.pdf
So you have the choice of using the pin as a GPIO. So you can
implement pure on/off. That gives you the minimum you need for
/sys/class/leds.
TABLE 12-1: LED OPERATION AS A FUNCTION OF LED_FUN[1:0]
The functions are rather scattered all over the place, but i don't see
a blocker to supporting hardware offload. It will be messy, yes, but
possible.
We have been pushing back on vendor properties for LEDs for a number
of years, so i don't really want to add one now.
Andrew
next prev parent reply other threads:[~2026-11-26 15:05 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-26 14:13 [PATCH net-next 0/3] " Paul Louvel
2026-11-26 14:13 ` [PATCH net-next 1/3] dt-bindings: net: dsa: lan9303: add Microchip LAN9354 compatible Paul Louvel
2026-11-26 14:13 ` [PATCH net-next 2/3] dt-bindings: net: dsa: lan9303: add smsc,led-mode property Paul Louvel
2026-11-26 14:13 ` [PATCH net-next 3/3] net: dsa: lan9303: add LED mode configuration Paul Louvel
2026-11-26 15:04 ` Andrew Lunn [this message]
2026-11-26 14:52 ` [PATCH net-next 0/3] " Andrew Lunn
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=4d2a5db3-2829-4383-8f8d-05cf7c94fddc@lunn.ch \
--to=andrew@lunn.ch \
--cc=Frank.Li@nxp.com \
--cc=bo.mellberg@se.com \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@kernel.org \
--cc=jerry.ray@microchip.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=miquel.raynal@bootlin.com \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=pascal.eberhard@se.com \
--cc=paul.louvel@bootlin.com \
--cc=robh@kernel.org \
--cc=thomas.petazzoni@bootlin.com \
/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
all inboxes | Powered by JetHome®