Re: [PATCH v2 1/4] dt-bindings: leds: Add YAML bindings for Virtual Color LED Group driver

From: Krzysztof Kozlowski

Date: Mon Oct 13 2025 - 19:41:55 EST


On 13/10/2025 14:09, Jonathan Brophy wrote:
> From: Jonathan Brophy <professor_jonny@xxxxxxxxxxx>
>
> Document Virtual Color device tree bindings.

I don't see how you answered my comment about missing justification.

Rob's questions also were not answered.

Few minor things follow up, but considering missing reasoning I did not
perform full review.

A nit, subject: drop second/last, redundant "YAML bindings for". The
"dt-bindings" prefix is already stating that these are bindings.
See also:
https://elixir.bootlin.com/linux/v6.17-rc3/source/Documentation/devicetree/bindings/submitting-patches.rst#L18

... and driver. Again - explain the hardware. Bindings are not for driver.

>
> Co-developed-by: Radoslav Tsvetkov <rtsvetkov@xxxxxxxxxxxx>
> Signed-off-by: Radoslav Tsvetkov <rtsvetkov@xxxxxxxxxxxx>
> Signed-off-by: Jonathan Brophy <professor_jonny@xxxxxxxxxxx>
> ---
> .../leds/leds-group-virtualcolor.yaml | 100 ++++++++++++++++++
> 1 file changed, 100 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 000000000000..bafdd8fb9557
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/leds/leds-group-virtualcolor.yaml
> @@ -0,0 +1,100 @@
> +# 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: Common properties for virtualcolor led class
> +
> +maintainers:
> + - Radoslav Tsvetkov <rtsvetkov@xxxxxxxxxxxx>
> +
> +description: |
> + Bindings to show how to achieve logically grouped virtual LEDs.
> + The nodes and properties defined in this document are unique to the
> + virtualcolor LED class.

That's completely redundant statement.

> + Common LED nodes and properties are inherited from the common.yaml
> + within this documentation directory

As well drop. Your description is pretty obvious and does not help at all.

> +
> +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#

Missing unevaluatedProperties: false.

> + properties:
> + reg:
> + maxItems: 1
> + description: Virtual LED number
> +
> + leds:
> + $ref: /schemas/types.yaml#/definitions/phandle-array
> + description: List of phandles to the monochromatic LEDs to group
> +
> + function:
> + description: |
> + For virtualcolor LEDs this property should be defined as
> + LED_FUNCTION_VIRTUAL_STATUS as outlined in:
> + include/dt-bindings/leds/common.h.
> +
> + 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
> +
> + blink-delay-off:
> + $ref: /schemas/types.yaml#/definitions/uint32
> + description: Time in milliseconds the LED is off during blink
> + note: Setting just one of the blink delays to a valid value while
> + setting the other to null will cause the LED to operate with a one-shot
> + on or off delay instead of a repeat cycle.


And drop all above, except reg and leds. If these are new properties,
then you need to use proper unit suffixes.

https://github.com/devicetree-org/dt-schema/blob/main/dtschema/schemas/property-units.yaml

Best regards,
Krzysztof