diff mbox series

[2/2] dt-bindings: leds: Document mmc trigger

Message ID 20211024002358.225750-2-marex@denx.de
State Changes Requested, archived
Headers show
Series [1/2] dt-bindings: leds: Document none trigger | expand

Checks

Context Check Description
robh/checkpatch success
robh/dt-meta-schema fail build log

Commit Message

Marek Vasut Oct. 24, 2021, 12:23 a.m. UTC
The mmc subsystem supports triggering leds on card activity, document
the trigger value here. The value is a pattern in this case.

Signed-off-by: Marek Vasut <marex@denx.de>
Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>
Cc: Pavel Machek <pavel@ucw.cz>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: devicetree@vger.kernel.org
To: linux-leds@vger.kernel.org
---
 .../devicetree/bindings/leds/common.yaml      | 43 ++++++++++---------
 1 file changed, 23 insertions(+), 20 deletions(-)

Comments

Pavel Machek Oct. 24, 2021, 8:40 a.m. UTC | #1
Hi!

> The mmc subsystem supports triggering leds on card activity, document
> the trigger value here. The value is a pattern in this case.

I don't believe this is suitable as devicetree does not know about mmc
numbers.

Best regards,
								Pavel
Rob Herring Oct. 24, 2021, 2:27 p.m. UTC | #2
On Sun, 24 Oct 2021 02:23:58 +0200, Marek Vasut wrote:
> The mmc subsystem supports triggering leds on card activity, document
> the trigger value here. The value is a pattern in this case.
> 
> Signed-off-by: Marek Vasut <marex@denx.de>
> Cc: Jacek Anaszewski <jacek.anaszewski@gmail.com>
> Cc: Pavel Machek <pavel@ucw.cz>
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: devicetree@vger.kernel.org
> To: linux-leds@vger.kernel.org
> ---
>  .../devicetree/bindings/leds/common.yaml      | 43 ++++++++++---------
>  1 file changed, 23 insertions(+), 20 deletions(-)
> 

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:
./Documentation/devicetree/bindings/leds/common.yaml:85:9: [warning] wrong indentation: expected 10 but found 8 (indentation)

dtschema/dtc warnings/errors:

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/patch/1545330

This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit.
Marek Vasut Oct. 24, 2021, 6:03 p.m. UTC | #3
On 10/24/21 10:40 AM, Pavel Machek wrote:
> Hi!
> 
>> The mmc subsystem supports triggering leds on card activity, document
>> the trigger value here. The value is a pattern in this case.
> 
> I don't believe this is suitable as devicetree does not know about mmc
> numbers.

There are multiple instances of this trigger type in existing DTs, see:

$ git grep linux.default-trigger.=..mmc | wc -l
85

So what alternative do you suggest ?
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/leds/common.yaml b/Documentation/devicetree/bindings/leds/common.yaml
index 22197376fa3c7..40afb06072d9c 100644
--- a/Documentation/devicetree/bindings/leds/common.yaml
+++ b/Documentation/devicetree/bindings/leds/common.yaml
@@ -79,26 +79,29 @@  properties:
       the LED.
     $ref: /schemas/types.yaml#/definitions/string
 
-    enum:
-        # LED will act as a back-light, controlled by the framebuffer system
-      - backlight
-        # LED will turn on (but for leds-gpio see "default-state" property in
-        # Documentation/devicetree/bindings/leds/leds-gpio.yaml)
-      - default-on
-        # LED "double" flashes at a load average based rate
-      - heartbeat
-        # LED indicates disk activity
-      - disk-activity
-        # LED indicates IDE disk activity (deprecated), in new implementations
-        # use "disk-activity"
-      - ide-disk
-        # LED is not triggered
-      - none
-        # LED flashes at a fixed, configurable rate
-      - timer
-        # LED alters the brightness for the specified duration with one software
-        # timer (requires "led-pattern" property)
-      - pattern
+    oneOf:
+      - enum:
+          # LED will act as a back-light, controlled by the framebuffer system
+        - backlight
+          # LED will turn on (but for leds-gpio see "default-state" property in
+          # Documentation/devicetree/bindings/leds/leds-gpio.yaml)
+        - default-on
+          # LED "double" flashes at a load average based rate
+        - heartbeat
+          # LED indicates disk activity
+        - disk-activity
+          # LED indicates IDE disk activity (deprecated), in new implementations
+          # use "disk-activity"
+        - ide-disk
+          # LED is not triggered
+        - none
+          # LED flashes at a fixed, configurable rate
+        - timer
+          # LED alters the brightness for the specified duration with one software
+          # timer (requires "led-pattern" property)
+        - pattern
+        # LED is triggered by SD/MMC activity
+      - pattern: "^mmc[0-9]+$"
 
   led-pattern:
     description: |