Skip to contentSkip to conversation

dt-bindings: leds: add "usbport" trigger

PATCH Superseded Rafał Miłecki 2 participants 2 messages Mar 8, 2023 – Mar 16, 2023

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 dt-bindings: leds: add "usbport" trigger

From: Rafał Miłecki <[email protected]>

Linux's "usbport" trigger is a bit specific one. It allows LED to follow state of multiple USB ports which have to be selected additionally (there isn't a single trigger for each port).

Default list of USB ports to monitor can be specified using "trigger-sources" DT property. Theoretically it should be possible for Linux to deduce applicable trigger based on the references nodes in the "trigger-sources". It hasn't been implemented however (probably due to laziness).

Milk spilled - we already have DT files specifying "usbport" manually - allow that value in the binding. This fixes validation of in-kernel and external DT files.

---
 Documentation/devicetree/bindings/leds/common.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/leds/common.yaml +1 -0
index 15e3f6645682..95b316ee3146 100644
@@ -99,6 +99,7 @@ properties:
           - pattern
           - usb-gadget
           - usb-host
+          - usbport
       - pattern: "^cpu[0-9]*$"
       - pattern: "^hci[0-9]+-power$"
         # LED is triggered by Bluetooth activity
Signature · 1 line
2.34.1
maintainer
#1 lore raw
Quoted 12 lines · Rafał Miłecki

From: Rafał Miłecki <[email protected]>

Linux's "usbport" trigger is a bit specific one. It allows LED to follow state of multiple USB ports which have to be selected additionally (there isn't a single trigger for each port).

Default list of USB ports to monitor can be specified using "trigger-sources" DT property. Theoretically it should be possible for Linux to deduce applicable trigger based on the references nodes in the "trigger-sources". It hasn't been implemented however (probably due to laziness).

Quoted 8 lines

Milk spilled - we already have DT files specifying "usbport" manually - allow that value in the binding. This fixes validation of in-kernel and external DT files.

---
 Documentation/devicetree/bindings/leds/common.yaml | 1 +
 1 file changed, 1 insertion(+)

Doesn't apply. Please rebase onto -next.

Hint: Requires a line of documentation above the new property.

Quoted 13 lines
Documentation/devicetree/bindings/leds/common.yaml +1 -1
index 15e3f6645682..95b316ee3146 100644
@@ -99,6 +99,7 @@ properties:
           - pattern
           - usb-gadget
           - usb-host
+          - usbport
       - pattern: "^cpu[0-9]*$"
       - pattern: "^hci[0-9]+-power$"
         # LED is triggered by Bluetooth activity
--
Quoted 2 lines

2.34.1

--
Lee Jones [李琼斯]