devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzk@kernel.org>
To: Jonathan Brophy <professorjonny98@gmail.com>,
	lee Jones <lee@kernel.org>, Pavel Machek <pavel@kernel.org>,
	Jonathan Brophy <professor_jonny@hotmail.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Radoslav Tsvetkov <rtsvetkov@gradotech.eu>
Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-leds@vger.kernel.org
Subject: Re: [PATCH 2/4] dt-bindings: leds: Add YAML bindings for Virtual Color LED Group driver
Date: Thu, 9 Oct 2025 23:18:07 +0900	[thread overview]
Message-ID: <204c121b-4697-44f3-80b2-b66f77a60168@kernel.org> (raw)
In-Reply-To: <20251009084339.1586319-2-professorjonny98@gmail.com>

On 09/10/2025 17:43, Jonathan Brophy wrote:
> From: Jonathan Brophy <professor_jonny@hotmail.com>
> 
> Document Virtual Color device tree bindings.
> 
> Co Signed-off-by: Radoslav Tsvetkov <rtsvetkov@gradotech.eu>

Messed SoB chain... plus corrupted tag. Please look at submitting
patches what should be written here.

> Signed-off-by: Jonathan Brophy <professor_jonny@hotmail.com>
> ---
>  .../leds/leds-group-virtualcolor.yaml         | 88 +++++++++++++++++++
>  1 file changed, 88 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/leds/leds-group-virtualcolor.yaml
> 
> diff --git a/Documentation/devicetree/bindings/leds/leds-group-virtualcolor.yaml b/Documentation/devicetree/bindings/leds/leds-group-virtualcolor.yaml
> new file mode 100644
> index 000000000..945058415
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/leds/leds-group-virtualcolor.yaml
> @@ -0,0 +1,88 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/leds/leds-group-virtualcolor.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +title: Virtual LED Group with Priority Control


Bindings describe real hardware, not virtual arrangements. At least
usually. You need to make a case in the commit msg why we want exception
from standard rule.

> +
> +maintainers:
> +  - Radoslav Tsvetkov <rtsvetkov@gradotech.eu>
> +
> +description: |
> +  Virtual LED group driver that combines multiple monochromatic LEDs into


For sure we do not describe drivers here. Describe hardware or
system/board-level concept.

> +  logical groups with priority-based control. The driver ensures only the
> +  highest-priority LED state is active at any given time.
> +
> +allOf:
> +  - $ref: common.yaml#
> +
> +properties:
> +  compatible:
> +    const: leds-group-virtualcolor
> +
> +  '#address-cells':
> +    const: 1
> +
> +  '#size-cells':
> +    const: 0
> +
> +required:
> +  - compatible
> +
> +patternProperties:
> +  '^led@[0-9a-f]$':
> +    type: object
> +    $ref: common.yaml#
> +    properties:
> +      reg:
> +        maxItems: 1
> +        description: Virtual LED number
> +
> +      monochromatic-leds:
> +        $ref: /schemas/types.yaml#/definitions/phandle
> +        description: List of phandles to the monochromatic LEDs to group

You allow only one phandle, not list, so this is confusing.

> +
> +      priority:
> +        $ref: /schemas/types.yaml#/definitions/uint32
> +        description: Priority level for LED activation
> +                     (higher value means higher priority)
> +
> +      blink-delay-on:
> +        $ref: /schemas/types.yaml#/definitions/uint32
> +        description: Time in milliseconds the LED is on during blink

Time in ms is expressed with proper unit suffix.

Isn't there standard property for this?

> +
> +      blink-delay-off:
> +        $ref: /schemas/types.yaml#/definitions/uint32
> +        description: Time in milliseconds the LED is off during blink
> +
> +    required:
> +      - reg
> +      - monochromatic-leds
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    led-controller {
> +        compatible = "leds-group-virtualcolor";
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +
> +        led@0 {
> +            reg = <0>;
> +            label = "status:red";

Use color and function instead.

> +            monochromatic-leds = <&led_red>;
> +            priority = <2>;
> +            blink-delay-on = <500>;
> +            blink-delay-off = <500>;
> +        };
> +
> +        led@1 {
> +            reg = <1>;
> +            label = "status:green";
> +            monochromatic-leds = <&led_green>;
> +            priority = <1>;
> +        };
> +    };
> +
> \ No newline at end of file

You have patch warnings.

Best regards,
Krzysztof

  reply	other threads:[~2025-10-09 14:18 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-09  8:43 [PATCH 1/4] leds: Add Virtual Color LED Group driver Jonathan Brophy
2025-10-09  8:43 ` [PATCH 2/4] dt-bindings: leds: Add YAML bindings for " Jonathan Brophy
2025-10-09 14:18   ` Krzysztof Kozlowski [this message]
2025-10-09  8:43 ` [PATCH 3/4] ABI: sysfs-class-leds-virtualcolor: Document sysfs entries for Virtual Color LEDs Jonathan Brophy
2025-10-09  8:43 ` [PATCH 4/4] dt-bindings: led: add virtual LED bindings Jonathan Brophy
2025-10-09 14:19   ` Krzysztof Kozlowski
2025-10-09 14:25 ` [PATCH 1/4] leds: Add Virtual Color LED Group driver Krzysztof Kozlowski
2025-10-13  0:24   ` Jonathan Brophy
2025-10-13  0:44     ` Krzysztof Kozlowski
2025-10-09 15:18 ` Lee Jones
2025-10-10  0:10   ` Jonathan Brophy
2025-10-10  7:59     ` Lee Jones
2025-10-10 18:12 ` Rob Herring

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=204c121b-4697-44f3-80b2-b66f77a60168@kernel.org \
    --to=krzk@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=pavel@kernel.org \
    --cc=professor_jonny@hotmail.com \
    --cc=professorjonny98@gmail.com \
    --cc=robh@kernel.org \
    --cc=rtsvetkov@gradotech.eu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).