diff mbox series

[v6] dt-bindings: leds: Document commonly used LED triggers

Message ID 20230213072133.5977-1-manivannan.sadhasivam@linaro.org
State New
Headers show
Series [v6] dt-bindings: leds: Document commonly used LED triggers | expand

Commit Message

Manivannan Sadhasivam Feb. 13, 2023, 7:21 a.m. UTC
Document the commonly used LED triggers by the SoCs. Not all triggers
are documented as some of them are very application specific. Most of the
triggers documented here are currently used in devicetrees of many SoCs.

While at it, also place the comment above the triggers (hci, mmc, wlan)
to match the rest of the binding.

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
---

Changes in v6:

* Rebased on top of lee/for-leds-next branch
* Fixed the comment location for few triggers

Changes in v5:

* Rebased on top of v6.2-rc1

Changes in v4:

* Removed the sorting of triggers
* Removed the "items" as they were not needed
* Reworded the description
* Dropped Zhen Lei's tested-by tag as the patch has changed
* Added kbd-capslock trigger

Changes in v3:

* Rebased on top of v6.1-rc1
* Added WLAN Rx trigger
* Added tested tag from Zhen Lei

Changes in v2:

* Added more triggers, fixed the regex
* Sorted triggers in ascending order

 .../devicetree/bindings/leds/common.yaml      | 37 +++++++++++++++++--
 1 file changed, 34 insertions(+), 3 deletions(-)

Comments

Rob Herring Feb. 15, 2023, 7:26 p.m. UTC | #1
On Mon, 13 Feb 2023 12:51:33 +0530, Manivannan Sadhasivam wrote:
> Document the commonly used LED triggers by the SoCs. Not all triggers
> are documented as some of them are very application specific. Most of the
> triggers documented here are currently used in devicetrees of many SoCs.
> 
> While at it, also place the comment above the triggers (hci, mmc, wlan)
> to match the rest of the binding.
> 
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
> 
> Changes in v6:
> 
> * Rebased on top of lee/for-leds-next branch
> * Fixed the comment location for few triggers
> 
> Changes in v5:
> 
> * Rebased on top of v6.2-rc1
> 
> Changes in v4:
> 
> * Removed the sorting of triggers
> * Removed the "items" as they were not needed
> * Reworded the description
> * Dropped Zhen Lei's tested-by tag as the patch has changed
> * Added kbd-capslock trigger
> 
> Changes in v3:
> 
> * Rebased on top of v6.1-rc1
> * Added WLAN Rx trigger
> * Added tested tag from Zhen Lei
> 
> Changes in v2:
> 
> * Added more triggers, fixed the regex
> * Sorted triggers in ascending order
> 
>  .../devicetree/bindings/leds/common.yaml      | 37 +++++++++++++++++--
>  1 file changed, 34 insertions(+), 3 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Lee Jones March 3, 2023, 10:34 a.m. UTC | #2
On Mon, 13 Feb 2023, Manivannan Sadhasivam wrote:

> Document the commonly used LED triggers by the SoCs. Not all triggers
> are documented as some of them are very application specific. Most of the
> triggers documented here are currently used in devicetrees of many SoCs.
> 
> While at it, also place the comment above the triggers (hci, mmc, wlan)
> to match the rest of the binding.
> 
> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> ---
> 
> Changes in v6:
> 
> * Rebased on top of lee/for-leds-next branch
> * Fixed the comment location for few triggers
> 
> Changes in v5:
> 
> * Rebased on top of v6.2-rc1
> 
> Changes in v4:
> 
> * Removed the sorting of triggers
> * Removed the "items" as they were not needed
> * Reworded the description
> * Dropped Zhen Lei's tested-by tag as the patch has changed
> * Added kbd-capslock trigger
> 
> Changes in v3:
> 
> * Rebased on top of v6.1-rc1
> * Added WLAN Rx trigger
> * Added tested tag from Zhen Lei
> 
> Changes in v2:
> 
> * Added more triggers, fixed the regex
> * Sorted triggers in ascending order
> 
>  .../devicetree/bindings/leds/common.yaml      | 37 +++++++++++++++++--
>  1 file changed, 34 insertions(+), 3 deletions(-)

Applied, thanks
Manivannan Sadhasivam March 3, 2023, 12:30 p.m. UTC | #3
On Fri, Mar 03, 2023 at 11:39:45AM +0000, Lee Jones wrote:
> On Fri, 03 Mar 2023, Lee Jones wrote:
> 
> > On Mon, 13 Feb 2023, Manivannan Sadhasivam wrote:
> > 
> > > Document the commonly used LED triggers by the SoCs. Not all triggers
> > > are documented as some of them are very application specific. Most of the
> > > triggers documented here are currently used in devicetrees of many SoCs.
> > > 
> > > While at it, also place the comment above the triggers (hci, mmc, wlan)
> > > to match the rest of the binding.
> > > 
> > > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
> > > ---
> > > 
> > > Changes in v6:
> > > 
> > > * Rebased on top of lee/for-leds-next branch
> > > * Fixed the comment location for few triggers
> > > 
> > > Changes in v5:
> > > 
> > > * Rebased on top of v6.2-rc1
> > > 
> > > Changes in v4:
> > > 
> > > * Removed the sorting of triggers
> > > * Removed the "items" as they were not needed
> > > * Reworded the description
> > > * Dropped Zhen Lei's tested-by tag as the patch has changed
> > > * Added kbd-capslock trigger
> > > 
> > > Changes in v3:
> > > 
> > > * Rebased on top of v6.1-rc1
> > > * Added WLAN Rx trigger
> > > * Added tested tag from Zhen Lei
> > > 
> > > Changes in v2:
> > > 
> > > * Added more triggers, fixed the regex
> > > * Sorted triggers in ascending order
> > > 
> > >  .../devicetree/bindings/leds/common.yaml      | 37 +++++++++++++++++--
> > >  1 file changed, 34 insertions(+), 3 deletions(-)
> > 
> > Applied, thanks
> 
> Change of plan.  This doesn't apply cleanly.
> 
> Could you please rebase and resubmit please?
> 

Done!

Thanks,
Mani

> -- 
> Lee Jones [李琼斯]
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/leds/common.yaml b/Documentation/devicetree/bindings/leds/common.yaml
index d34bb58c0037..9814371eaa4c 100644
--- a/Documentation/devicetree/bindings/leds/common.yaml
+++ b/Documentation/devicetree/bindings/leds/common.yaml
@@ -98,13 +98,44 @@  properties:
             # LED alters the brightness for the specified duration with one software
             # timer (requires "led-pattern" property)
           - pattern
+            # LED indicates mic mute state
+          - audio-micmute
+            # LED indicates audio mute state
+          - audio-mute
+            # LED indicates bluetooth power state
+          - bluetooth-power
+            # LED indicates activity of all CPUs
+          - cpu
+            # LED indicates disk read activity
+          - disk-read
+            # LED indicates disk write activity
+          - disk-write
+            # LED indicates camera flash state
+          - flash
+            # LED indicated keyboard capslock
+          - kbd-capslock
+            # LED indicates MTD memory activity
+          - mtd
+            # LED indicates NAND memory activity (deprecated),
+            # in new implementations use "mtd"
+          - nand-disk
+            # No trigger assigned to the LED. This is the default mode
+            # if trigger is absent
+          - none
+            # LED indicates camera torch state
+          - torch
+            # LED indicates USB gadget activity
+          - usb-gadget
+            # LED indicates USB host activity
+          - usb-host
+        # LED is triggered by CPU activity
       - pattern: "^cpu[0-9]*$"
-      - pattern: "^hci[0-9]+-power$"
         # LED is triggered by Bluetooth activity
-      - pattern: "^mmc[0-9]+$"
+      - pattern: "^hci[0-9]+-power$"
         # LED is triggered by SD/MMC activity
-      - pattern: "^phy[0-9]+tx$"
+      - pattern: "^mmc[0-9]+$"
         # LED is triggered by WLAN activity
+      - pattern: "^phy[0-9]+tx$"
 
   led-pattern:
     description: |