lkml.org 
[lkml]   [2022]   [Jul]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
SubjectRe: [PATCH 1/2] dt-bindings: leds: Add cznic,turris1x-leds.yaml binding
From
On 05/07/2022 02:04, Pali Rohár wrote:
> Add device-tree bindings documentation for Turris 1.x RGB LEDs.
>
> Signed-off-by: Pali Rohár <pali@kernel.org>
> ---
> .../bindings/leds/cznic,turris1x-leds.yaml | 116 ++++++++++++++++++
> 1 file changed, 116 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/leds/cznic,turris1x-leds.yaml
>
> diff --git a/Documentation/devicetree/bindings/leds/cznic,turris1x-leds.yaml b/Documentation/devicetree/bindings/leds/cznic,turris1x-leds.yaml
> new file mode 100644
> index 000000000000..fd09613c8d2d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/leds/cznic,turris1x-leds.yaml
> @@ -0,0 +1,116 @@
> +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/leds/cznic,turris1x-leds.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: CZ.NIC's Turris 1.x LEDs driver
> +
> +maintainers:
> + - Pali Rohár <pali@kernel.org>
> +
> +description:
> + This module adds support for the RGB LEDs found on the front panel of the
> + Turris 1.x routers. There are 8 RGB LEDs that are controlled by CZ.NIC CPLD
> + firmware running on Lattice FPGA. Firmware is open source and available at
> + https://gitlab.nic.cz/turris/hw/turris_cpld/-/blob/master/CZ_NIC_Router_CPLD.v
> +
> +properties:
> + compatible:
> + const: cznic,turris1x-leds
> +
> + reg:
> + maxItems: 2

You need to describe the items, if it is really two items. However your
example has only one item, so this was not tested and won't work.

You'll get warning from Rob's robot soon... but you should test the
bindings instead.

> +
> + "#address-cells":
> + const: 1
> +
> + "#size-cells":
> + const: 0
> +
> +patternProperties:
> + "^multi-led@[0-7]$":
> + type: object
> + $ref: leds-class-multicolor.yaml#

This looks incorrect, unless you rebased on my patchset?

> +
> + properties:
> + reg:
> + minimum: 0
> + maximum: 7
> +
> + required:
> + - reg
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> +

No blank line.

> + #include <dt-bindings/leds/common.h>
> +
> + cpld@3,0 {

Generic node name.

> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + led-controller@13 {
> + compatible = "cznic,turris1x-leds";
> + reg = <0x13 0x1d>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +


Best regards,
Krzysztof

\
 
 \ /
  Last update: 2022-07-05 13:38    [W:0.173 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site