Thread View: linux.kernel.netdev
2 messages
2 total messages
Started by Andrew Lunn
Thu, 26 Nov 2026 15:04
Re: [PATCH net-next 3/3] net: dsa: lan9303: add LED mode configuration
Author: Andrew Lunn
Date: Thu, 26 Nov 2026 15:04
Date: Thu, 26 Nov 2026 15:04
33 lines
9832 bytes
9832 bytes
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
Re: [PATCH net-next 3/3] net: dsa: lan9303: add LED mode configuration
Author: Andrew Lunn
Date: Sat, 28 Nov 2026 15:59
Date: Sat, 28 Nov 2026 15:59
13 lines
9177 bytes
9177 bytes
> At first, I thought that the fact that this PHY has a single field for all LEDs > function would make the vendor property somewhat acceptable. As i said, it makes the implementation messy, and many of the blink modes are going to end up in software, but it looks like the standard /sys/class/led API can be used. I would try to document an a simple to understand way what each LED can do in hardware. That way users can try to keep with the hardware offload cases. Andrew
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads