mirror of
https://github.com/openwrt/openwrt.git
synced 2025-01-29 23:54:26 +00:00
5c1c823c4a
On QNAP QHora-301W, all LEDs don't have "function" property and only "color" property is available for the newer binding of LED on Linux Kernel. 2e659930d3 ("qualcommax: drop redundant label with new LED color/function format") removes "label" property from LEDs, then, multiple "<color>:" (ex.: "amber:"/"green:"/"red:") will be appeared as LED names and renamed to "<color>:_<num>" ("ex.: "green:_1", "green:_2", ...) by kernel. logs: [ 4.246494] leds-gpio leds: Led green: renamed to green:_1 due to name collision [ 4.248978] leds-gpio leds: Led green: renamed to green:_2 due to name collision [ 4.256345] leds-gpio leds: Led green: renamed to green:_3 due to name collision [ 4.263770] leds-gpio leds: Led green: renamed to green:_4 due to name collision [ 4.271105] leds-gpio leds: Led amber: renamed to amber:_1 due to name collision [ 4.278487] leds-gpio leds: Led green: renamed to green:_5 due to name collision [ 4.285856] leds-gpio leds: Led amber: renamed to amber:_2 due to name collision [ 4.293257] leds-gpio leds: Led green: renamed to green:_6 due to name collision [ 4.300616] leds-gpio leds: Led amber: renamed to amber:_3 due to name collision [ 4.308002] leds-gpio leds: Led green: renamed to green:_7 due to name collision [ 4.315384] leds-gpio leds: Led amber: renamed to amber:_4 due to name collision [ 4.322760] leds-gpio leds: Led green: renamed to green:_8 due to name collision [ 4.330135] leds-gpio leds: Led amber: renamed to amber:_5 due to name collision /sys/class/leds: amber: amber:_4 green:_2 green:_6 amber:_1 green:_5 green:_3 green:_7 amber:_2 green: green:_4 green:_8 amber:_3 green:_1 green:_5 red: Fix this issue by adding missing "function" (and "function-enumerator") property to LEDs on QNAP QHora-301W. Note: there are no appropriate functions in dt-bindings/leds/common.h for some LEDs, so use the hardcoded strings for them instead. Fixes: 2e659930d3 ("qualcommax: drop redundant label with new LED color/function format") Signed-off-by: INAGAKI Hiroshi <musashino.open@gmail.com>