diff options
author | INAGAKI Hiroshi <musashino.open@gmail.com> | 2024-03-16 15:28:31 +0900 |
---|---|---|
committer | Robert Marko <robimarko@gmail.com> | 2024-03-17 17:31:02 +0100 |
commit | 5c1c823c4ae2a3283b8e5ec0b68c4774456507f2 (patch) | |
tree | cf36cabfa520224506a0848b1968ba0f98d71762 /target/linux/qualcommax/files/arch/arm64/boot | |
parent | e0638cfe70c8e4ef85a3a0c3fea6fb39fd370469 (diff) |
qualcommax: ipq807x: fix LEDs on QNAP QHora-301W
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>
Diffstat (limited to 'target/linux/qualcommax/files/arch/arm64/boot')
-rw-r--r-- | target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-301w.dts | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-301w.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-301w.dts index 081e932b5c..2fe723591e 100644 --- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-301w.dts +++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-301w.dts @@ -63,81 +63,109 @@ led_system_green: led-system-green { gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>; color = <LED_COLOR_ID_GREEN>; + function = LED_FUNCTION_STATUS; }; led_system_red: led-system-red { gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>; color = <LED_COLOR_ID_RED>; + function = LED_FUNCTION_STATUS; }; led_pwr_green: led-pwr-green { gpios = <&tlmm 4 GPIO_ACTIVE_HIGH>; color = <LED_COLOR_ID_GREEN>; + function = LED_FUNCTION_POWER; }; led-wifi-green { gpios = <&tlmm 42 GPIO_ACTIVE_HIGH>; color = <LED_COLOR_ID_GREEN>; + function = LED_FUNCTION_WLAN; }; led-lan4-green { gpios = <&tlmm 6 GPIO_ACTIVE_HIGH>; color = <LED_COLOR_ID_GREEN>; + function = LED_FUNCTION_LAN; + function-enumerator = <4>; }; led-lan4-amber { gpios = <&tlmm 7 GPIO_ACTIVE_HIGH>; color = <LED_COLOR_ID_AMBER>; + function = LED_FUNCTION_LAN; + function-enumerator = <4>; }; led-lan3-green { gpios = <&tlmm 8 GPIO_ACTIVE_HIGH>; color = <LED_COLOR_ID_GREEN>; + function = LED_FUNCTION_LAN; + function-enumerator = <3>; }; led-lan3-amber { gpios = <&tlmm 11 GPIO_ACTIVE_HIGH>; color = <LED_COLOR_ID_AMBER>; + function = LED_FUNCTION_LAN; + function-enumerator = <3>; }; led-lan2-green { gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>; color = <LED_COLOR_ID_GREEN>; + function = LED_FUNCTION_LAN; + function-enumerator = <2>; }; led-lan2-amber { gpios = <&tlmm 13 GPIO_ACTIVE_HIGH>; color = <LED_COLOR_ID_AMBER>; + function = LED_FUNCTION_LAN; + function-enumerator = <2>; }; led-lan1-green { gpios = <&tlmm 14 GPIO_ACTIVE_HIGH>; color = <LED_COLOR_ID_GREEN>; + function = LED_FUNCTION_LAN; + function-enumerator = <1>; }; led-lan1-amber { gpios = <&tlmm 15 GPIO_ACTIVE_HIGH>; color = <LED_COLOR_ID_AMBER>; + function = LED_FUNCTION_LAN; + function-enumerator = <1>; }; led-10g-1-green { gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>; color = <LED_COLOR_ID_GREEN>; + function = "10g"; + function-enumerator = <1>; }; led-10g-1-amber { gpios = <&tlmm 56 GPIO_ACTIVE_HIGH>; color = <LED_COLOR_ID_AMBER>; + function = "10g"; + function-enumerator = <1>; }; led-10g-2-green { gpios = <&tlmm 51 GPIO_ACTIVE_HIGH>; color = <LED_COLOR_ID_GREEN>; + function = "10g"; + function-enumerator = <2>; }; led-10g-2-amber { gpios = <&tlmm 52 GPIO_ACTIVE_HIGH>; color = <LED_COLOR_ID_AMBER>; + function = "10g"; + function-enumerator = <2>; }; }; }; |