All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: leds: Document none trigger
@ 2021-10-24  0:23 Marek Vasut
  2021-10-24  0:23 ` [PATCH 2/2] dt-bindings: leds: Document mmc trigger Marek Vasut
  2021-10-24  8:41 ` [PATCH 1/2] dt-bindings: leds: Document none trigger Pavel Machek
  0 siblings, 2 replies; 9+ messages in thread
From: Marek Vasut @ 2021-10-24  0:23 UTC (permalink / raw)
  To: linux-leds
  Cc: Marek Vasut, Jacek Anaszewski, Pavel Machek, Rob Herring, devicetree

There is a trigger called "none" which triggers never, add it to the
list of valid trigger values.

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
---
 Documentation/devicetree/bindings/leds/common.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/leds/common.yaml b/Documentation/devicetree/bindings/leds/common.yaml
index 697102707703a..22197376fa3c7 100644
--- a/Documentation/devicetree/bindings/leds/common.yaml
+++ b/Documentation/devicetree/bindings/leds/common.yaml
@@ -92,6 +92,8 @@ properties:
         # 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
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [PATCH 2/2] dt-bindings: leds: Document mmc trigger
  2021-10-24  0:23 [PATCH 1/2] dt-bindings: leds: Document none trigger Marek Vasut
@ 2021-10-24  0:23 ` Marek Vasut
  2021-10-24  8:40   ` Pavel Machek
  2021-10-24 14:27   ` Rob Herring
  2021-10-24  8:41 ` [PATCH 1/2] dt-bindings: leds: Document none trigger Pavel Machek
  1 sibling, 2 replies; 9+ messages in thread
From: Marek Vasut @ 2021-10-24  0:23 UTC (permalink / raw)
  To: linux-leds
  Cc: Marek Vasut, Jacek Anaszewski, Pavel Machek, Rob Herring, devicetree

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(-)

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: |
-- 
2.33.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] dt-bindings: leds: Document mmc trigger
  2021-10-24  0:23 ` [PATCH 2/2] dt-bindings: leds: Document mmc trigger Marek Vasut
@ 2021-10-24  8:40   ` Pavel Machek
  2021-10-24 18:03     ` Marek Vasut
  2021-10-24 14:27   ` Rob Herring
  1 sibling, 1 reply; 9+ messages in thread
From: Pavel Machek @ 2021-10-24  8:40 UTC (permalink / raw)
  To: Marek Vasut; +Cc: linux-leds, Jacek Anaszewski, Rob Herring, devicetree

[-- Attachment #1: Type: text/plain, Size: 306 bytes --]

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
-- 
http://www.livejournal.com/~pavelmachek

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] dt-bindings: leds: Document none trigger
  2021-10-24  0:23 [PATCH 1/2] dt-bindings: leds: Document none trigger Marek Vasut
  2021-10-24  0:23 ` [PATCH 2/2] dt-bindings: leds: Document mmc trigger Marek Vasut
@ 2021-10-24  8:41 ` Pavel Machek
  2021-10-24 18:05   ` Marek Vasut
  1 sibling, 1 reply; 9+ messages in thread
From: Pavel Machek @ 2021-10-24  8:41 UTC (permalink / raw)
  To: Marek Vasut; +Cc: linux-leds, Jacek Anaszewski, Rob Herring, devicetree

[-- Attachment #1: Type: text/plain, Size: 294 bytes --]

Hi!

> There is a trigger called "none" which triggers never, add it to the
> list of valid trigger values.

We can do this, but is it useful? If you avoid putting trigger
property, it will do the same thing.

Best regards,
								Pavel
-- 
http://www.livejournal.com/~pavelmachek

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 195 bytes --]

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] dt-bindings: leds: Document mmc trigger
  2021-10-24  0:23 ` [PATCH 2/2] dt-bindings: leds: Document mmc trigger Marek Vasut
  2021-10-24  8:40   ` Pavel Machek
@ 2021-10-24 14:27   ` Rob Herring
  1 sibling, 0 replies; 9+ messages in thread
From: Rob Herring @ 2021-10-24 14:27 UTC (permalink / raw)
  To: Marek Vasut
  Cc: Pavel Machek, Jacek Anaszewski, linux-leds, devicetree, Rob Herring

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.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 2/2] dt-bindings: leds: Document mmc trigger
  2021-10-24  8:40   ` Pavel Machek
@ 2021-10-24 18:03     ` Marek Vasut
  0 siblings, 0 replies; 9+ messages in thread
From: Marek Vasut @ 2021-10-24 18:03 UTC (permalink / raw)
  To: Pavel Machek; +Cc: linux-leds, Jacek Anaszewski, Rob Herring, devicetree

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 ?

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] dt-bindings: leds: Document none trigger
  2021-10-24  8:41 ` [PATCH 1/2] dt-bindings: leds: Document none trigger Pavel Machek
@ 2021-10-24 18:05   ` Marek Vasut
  2021-11-08 17:51     ` Rob Herring
  0 siblings, 1 reply; 9+ messages in thread
From: Marek Vasut @ 2021-10-24 18:05 UTC (permalink / raw)
  To: Pavel Machek; +Cc: linux-leds, Jacek Anaszewski, Rob Herring, devicetree

On 10/24/21 10:41 AM, Pavel Machek wrote:
> Hi!
> 
>> There is a trigger called "none" which triggers never, add it to the
>> list of valid trigger values.
> 
> We can do this, but is it useful? If you avoid putting trigger
> property, it will do the same thing.

It's not that simple. If you have a DT which specifies a trigger type 
and a DTO which overrides that trigger type, then the DTO cannot remove 
the trigger from the base DT, it has to set trigger type to "none". So I 
believe there is a valid use case for existence of the "none" type.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] dt-bindings: leds: Document none trigger
  2021-10-24 18:05   ` Marek Vasut
@ 2021-11-08 17:51     ` Rob Herring
  2021-11-08 22:49       ` Marek Vasut
  0 siblings, 1 reply; 9+ messages in thread
From: Rob Herring @ 2021-11-08 17:51 UTC (permalink / raw)
  To: Marek Vasut; +Cc: Pavel Machek, linux-leds, Jacek Anaszewski, devicetree

On Sun, Oct 24, 2021 at 08:05:55PM +0200, Marek Vasut wrote:
> On 10/24/21 10:41 AM, Pavel Machek wrote:
> > Hi!
> > 
> > > There is a trigger called "none" which triggers never, add it to the
> > > list of valid trigger values.
> > 
> > We can do this, but is it useful? If you avoid putting trigger
> > property, it will do the same thing.
> 
> It's not that simple. If you have a DT which specifies a trigger type and a
> DTO which overrides that trigger type, then the DTO cannot remove the
> trigger from the base DT, it has to set trigger type to "none". So I believe
> there is a valid use case for existence of the "none" type.

Sounds like an incorrect partitioning of base and overlays IMO. 

There's also already /delete-property/ directive though I'm not sure if 
that's supported in overlays.

Rob

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH 1/2] dt-bindings: leds: Document none trigger
  2021-11-08 17:51     ` Rob Herring
@ 2021-11-08 22:49       ` Marek Vasut
  0 siblings, 0 replies; 9+ messages in thread
From: Marek Vasut @ 2021-11-08 22:49 UTC (permalink / raw)
  To: Rob Herring; +Cc: Pavel Machek, linux-leds, Jacek Anaszewski, devicetree

On 11/8/21 6:51 PM, Rob Herring wrote:
> On Sun, Oct 24, 2021 at 08:05:55PM +0200, Marek Vasut wrote:
>> On 10/24/21 10:41 AM, Pavel Machek wrote:
>>> Hi!
>>>
>>>> There is a trigger called "none" which triggers never, add it to the
>>>> list of valid trigger values.
>>>
>>> We can do this, but is it useful? If you avoid putting trigger
>>> property, it will do the same thing.
>>
>> It's not that simple. If you have a DT which specifies a trigger type and a
>> DTO which overrides that trigger type, then the DTO cannot remove the
>> trigger from the base DT, it has to set trigger type to "none". So I believe
>> there is a valid use case for existence of the "none" type.
> 
> Sounds like an incorrect partitioning of base and overlays IMO.

Note that you might not have control over the base DT.

> There's also already /delete-property/ directive though I'm not sure if
> that's supported in overlays.

How do you encode /delete-property/ into the DT overlay blob .dtbo ?
I thought that /delete-property/ and /delete-node/ was a DTC directive 
and the DT blob has no way to represent either ?

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-11-08 22:49 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-24  0:23 [PATCH 1/2] dt-bindings: leds: Document none trigger Marek Vasut
2021-10-24  0:23 ` [PATCH 2/2] dt-bindings: leds: Document mmc trigger Marek Vasut
2021-10-24  8:40   ` Pavel Machek
2021-10-24 18:03     ` Marek Vasut
2021-10-24 14:27   ` Rob Herring
2021-10-24  8:41 ` [PATCH 1/2] dt-bindings: leds: Document none trigger Pavel Machek
2021-10-24 18:05   ` Marek Vasut
2021-11-08 17:51     ` Rob Herring
2021-11-08 22:49       ` Marek Vasut

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.