Skip to contentSkip to conversation

dt-bindings: mt76: add active-low property to led

PATCH Superseded Frank Wunderlich 3 participants 4 messages Feb 7, 2023

Subsystems (6)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 dt-bindings: mt76: add active-low property to led

From: Frank Wunderlich <[email protected]>

LEDs can be in low-active mode, so add dt property for it.

---
 .../devicetree/bindings/net/wireless/mediatek,mt76.yaml      | 5 +++++
 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml +5 -0
index f0c78f994491..212508672979 100644
@@ -112,6 +112,11 @@ properties:
     $ref: /schemas/leds/common.yaml#
     additionalProperties: false
     properties:
+      led-active-low:
+        description:
+          LED is enabled with ground signal.
+        type: boolean
+
       led-sources:
         maxItems: 1
 
Signature · 1 line
2.34.1
#1 lore raw
Quoted 14 lines · Frank Wunderlich

From: Frank Wunderlich <[email protected]>

LEDs can be in low-active mode, so add dt property for it.

---
 .../devicetree/bindings/net/wireless/mediatek,mt76.yaml      | 5 +++++
 1 file changed, 5 insertions(+)
Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml +0 -0
index f0c78f994491..212508672979 100644

Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml properties: · line 117

Quoted 6 lines
Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml +3 -0
@@ -112,6 +112,11 @@ properties:
     $ref: /schemas/leds/common.yaml#
     additionalProperties: false
     properties:
+      led-active-low:
+        description:
+          LED is enabled with ground signal.

What does it mean? You set voltage of regulator to 0? Or you set GPIO as 0? If the latter, it's not the property of LED...

Best regards,
Krzysztof

#2 lore raw
Quoted 12 lines

Gesendet: Dienstag, 07. Februar 2023 um 11:40 Uhr
Von: "Krzysztof Kozlowski" <[email protected]>

Quoted 9 lines · Frank Wunderlich

From: Frank Wunderlich <[email protected]>

LEDs can be in low-active mode, so add dt property for it.

---
 .../devicetree/bindings/net/wireless/mediatek,mt76.yaml      | 5 +++++
 1 file changed, 5 insertions(+)
Quoted 14 lines

Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml properties: · line 117

Quoted 11 lines
Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml +3 -0
index f0c78f994491..212508672979 100644
@@ -112,6 +112,11 @@ properties:
     $ref: /schemas/leds/common.yaml#
     additionalProperties: false
     properties:
+      led-active-low:
+        description:
+          LED is enabled with ground signal.

What does it mean? You set voltage of regulator to 0? Or you set GPIO as 0? If the latter, it's not the property of LED...

basicly it is a gpio-led mapped into the mt76 driver, but not passing gpio itself in this property (like gpio-led does). This gpio is set to 0 signal (gnd) to let the led go on ;) so imho it is a led-property, but below the wifi-node as the trigger comes from mt76 hardware, not an external (soc) gpio controller.

mt76 driver supports it already like i post change here:

https://patchwork.kernel.org/project/linux-mediatek/patch/[email protected]/

only needed the binding for it.

Quoted 4 lines

Best regards,
Krzysztof

#3 lore raw
Quoted 27 lines · Frank Wunderlich
Quoted 12 lines

Gesendet: Dienstag, 07. Februar 2023 um 11:40 Uhr
Von: "Krzysztof Kozlowski" <[email protected]>

Quoted 9 lines · Frank Wunderlich

From: Frank Wunderlich <[email protected]>

LEDs can be in low-active mode, so add dt property for it.

---
 .../devicetree/bindings/net/wireless/mediatek,mt76.yaml      | 5 +++++
 1 file changed, 5 insertions(+)
Quoted 14 lines

Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml properties: · line 117

Quoted 11 lines
Documentation/devicetree/bindings/net/wireless/mediatek,mt76.yaml +3 -0
index f0c78f994491..212508672979 100644
@@ -112,6 +112,11 @@ properties:
     $ref: /schemas/leds/common.yaml#
     additionalProperties: false
     properties:
+      led-active-low:
+        description:
+          LED is enabled with ground signal.

What does it mean? You set voltage of regulator to 0? Or you set GPIO as 0? If the latter, it's not the property of LED...

Quoted 6 lines

basicly it is a gpio-led mapped into the mt76 driver, but not passing gpio itself in this property (like gpio-led does). This gpio is set to 0 signal (gnd) to let the led go on ;) so imho it is a led-property, but below the wifi-node as the trigger comes from mt76 hardware, not an external (soc) gpio controller.

mt76 driver supports it already like i post change here:

If the driver supports it already and it was never documented, please state it. Your commit says you add a new property.

Best regards,
Krzysztof