On 06/11/2021 17:55, Arınç ÜNAL wrote:
On 4 Nov 2021, at 10:25, Rafał Miłecki <[email protected]> wrote:
On 04.11.2021 07:52, Rafał Miłecki wrote:
On 25.10.2021 23:37, Arınç ÜNAL wrote:
@@ -8,6 +8,12 @@ netgear,r8000)
ucidef_set_led_usbport "usb2" "USB 2.0" "bcm53xx:white:usb2" "usb1-port2"
"usb2-port2"
ucidef_set_led_usbport "usb3" "USB 3.0" "bcm53xx:white:usb3" "usb1-port1"
"usb2-port1" "usb4-port1"
;;
+asus,rt-ac88u)
+ ucidef_set_led_default "power" "Power" "white:power" "1"
Do we need that? "power" led seems to be enabled by default by DTS code:
linux,default-trigger = "default-on";
+ ucidef_set_led_netdev "lan" "LAN" "white:lan" "eth1"
This info should be put in DT but we don't have bindings for that yet.
Actually it seems "trigger-sources" can be used with Ethernet interfaces
as well. So I think what you need is to:
1. Add #trigger-source-cells = <0>; to ethernet@ nodes
2. Add trigger-sources = <&gmac0>; (or another gmac) to the LED node
This does not make ledtrig-netdev set gmac0 (translated to the network
interface name Linux creates) as the device_name
We'd have to specify these on the device tree:
device_name, interval, link, tx, rx
I can't define all of these in a way where it will work with
ledtrig-netdev.c.
3. Read trigger-sources in the ledtrig-netdev.c
For a refernece check drivers/usb/core/ledtrig-usbport.c
Trigger-sources are not there on ledtrig-netdev.c.
I believe it's not possible to define netdev trigger properly on the
device tree with the current state of ledtrig-netdev.c.
If you'd like to have everything (except lan for now) led taken out of
01_leds, let me know. I'm going to send v2 based on your response.
Arınç
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel