diff mbox series

[v2,03/11] dt-bindings: leds: Document "activity" trigger

Message ID 20210923065500.2284347-4-daniel@0x0f.com
State New
Headers show
Series gpio: msc313: Add gpio support for ssd20xd | expand

Commit Message

Daniel Palmer Sept. 23, 2021, 6:54 a.m. UTC
The "activity" trigger can be used as the default but it's currently
undocumented so validating a devicetree that uses it causes a warning.

Signed-off-by: Daniel Palmer <daniel@0x0f.com>
---
 Documentation/devicetree/bindings/leds/common.yaml | 2 ++
 1 file changed, 2 insertions(+)

Comments

Rob Herring (Arm) Sept. 27, 2021, 7:52 p.m. UTC | #1
On Thu, Sep 23, 2021 at 03:54:52PM +0900, Daniel Palmer wrote:
> The "activity" trigger can be used as the default but it's currently
> undocumented so validating a devicetree that uses it causes a warning.

It is preferred to use 'function' and LED_FUNCTION_CPU. Is there some 
reason that can't be used?

> 
> Signed-off-by: Daniel Palmer <daniel@0x0f.com>
> ---
>  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 697102707703..8160a5073728 100644
> --- a/Documentation/devicetree/bindings/leds/common.yaml
> +++ b/Documentation/devicetree/bindings/leds/common.yaml
> @@ -80,6 +80,8 @@ properties:
>      $ref: /schemas/types.yaml#/definitions/string
>  
>      enum:
> +        # LED will flashing will represent current CPU usage
> +      - activity
>          # 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
> -- 
> 2.33.0
> 
>
Daniel Palmer Sept. 27, 2021, 10:51 p.m. UTC | #2
Hi Rob,

On Tue, 28 Sept 2021 at 04:52, Rob Herring <robh@kernel.org> wrote:
>
> On Thu, Sep 23, 2021 at 03:54:52PM +0900, Daniel Palmer wrote:
> > The "activity" trigger can be used as the default but it's currently
> > undocumented so validating a devicetree that uses it causes a warning.
>
> It is preferred to use 'function' and LED_FUNCTION_CPU. Is there some
> reason that can't be used?

LED_FUNCTION_CPU seems to be tied to
drivers/leds/trigger/ledtrig-cpu.c which I think serves the same
purpose but does it a slightly different way.
Would adding LED_FUNCTION_ACTIVITY work?

Thanks,

Daniel
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/leds/common.yaml b/Documentation/devicetree/bindings/leds/common.yaml
index 697102707703..8160a5073728 100644
--- a/Documentation/devicetree/bindings/leds/common.yaml
+++ b/Documentation/devicetree/bindings/leds/common.yaml
@@ -80,6 +80,8 @@  properties:
     $ref: /schemas/types.yaml#/definitions/string
 
     enum:
+        # LED will flashing will represent current CPU usage
+      - activity
         # 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