mvebu: fix LEDs on IIJ SA-W2
authorINAGAKI Hiroshi <musashino.open@gmail.com>
Sun, 18 Feb 2024 06:01:51 +0000 (15:01 +0900)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 14 Apr 2024 17:46:30 +0000 (19:46 +0200)
commite0cc69bef4b87cabaa2e065a81e1a2c2749ce53e
treec605810f4ef730211d4e2e47c5a982c8fc4831e4
parent5038ec5bba5ccdaf9a78d8fa4dc8ef910d554bc1
mvebu: fix LEDs on IIJ SA-W2

On IIJ SA-W2, some multiple LEDs have no "function" property and only
"color" property is available for the newer binding of LED on Linux
Kernel.
9d93b6d091 ("mvebu: drop redundant label with new LED color/function
format") removes "label" property from LEDs, then, multiple "<color>:"
(ex.: "green:"/"red:") will be appeared and renamed to "<color>:_<num>"
(ex.: "green:_1", "green:_2", ...) by kernel.

log:

[    1.911118] leds-gpio leds: Led green: renamed to green:_1 due to name collision
[    1.918600] leds-gpio leds: Led red: renamed to red:_1 due to name collision
[    1.925727] leds-gpio leds: Led green: renamed to green:_2 due to name collision
[    1.933202] leds-gpio leds: Led red: renamed to red:_2 due to name collision
[    1.940321] leds-gpio leds: Led green: renamed to green:_3 due to name collision
[    1.947797] leds-gpio leds: Led red: renamed to red:_3 due to name collision
[    1.954939] leds-gpio leds: Led green: renamed to green:_4 due to name collision
[    1.962456] leds-gpio leds: Led green: renamed to green:_5 due to name collision

/sys/class/leds:

root@OpenWrt:/# ls /sys/class/leds/
green:        green:_3      green:status  red:_2
green:_1      green:_4      red:          red:_3
green:_2      green:_5      red:_1        red:status

Fix this issue by adding missing "function" (and "function-enumerator")
property to those LEDs on IIJ SA-W2.

Fixes: 9d93b6d091 ("mvebu: drop redundant label with new LED color/function format")
Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>
target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-380-iij-sa-w2.dts
target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-380-iij-sa-w2.dts