All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Nicolas Belin <nbelin@baylibre.com>
Cc: linux-kernel@vger.kernel.org, linux-leds@vger.kernel.org,
	jacek.anaszewski@gmail.com, pavel@ucw.cz, dmurphy@ti.com,
	devicetree@vger.kernel.org, baylibre-upstreaming@groups.io
Subject: Re: [PATCH v3 2/3] dt-bindings: leds: Shiji Lighting APA102C LED
Date: Fri, 13 Mar 2020 08:06:20 -0500	[thread overview]
Message-ID: <20200313130620.GA19369@bogus> (raw)
In-Reply-To: <1583502010-16210-3-git-send-email-nbelin@baylibre.com>

On Fri, Mar 06, 2020 at 02:40:09PM +0100, Nicolas Belin wrote:
> Document Shiji Lighting APA102C LED driver device tree bindings.
> 
> Signed-off-by: Nicolas Belin <nbelin@baylibre.com>
> ---
>  .../devicetree/bindings/leds/leds-apa102c.yaml     | 97 ++++++++++++++++++++++
>  1 file changed, 97 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/leds/leds-apa102c.yaml
> 
> diff --git a/Documentation/devicetree/bindings/leds/leds-apa102c.yaml b/Documentation/devicetree/bindings/leds/leds-apa102c.yaml
> new file mode 100644
> index 000000000000..21457fc3762d
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/leds/leds-apa102c.yaml
> @@ -0,0 +1,97 @@
> +# SPDX-License-Identifier: GPL-2.0

Dual license new bindings:

(GPL-2.0-only OR BSD-2-Clause)

> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/leds/leds-apa102c.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: LED driver for Shiji Lighting - APA102C
> +
> +maintainers:
> +  - Nicolas Belin <nbelin@baylibre.com>
> +
> +description:
> +  Each RGB LED is represented as a rgb-led sub-node of the leds-apa102c
> +  device.  Each LED is a three color rgb LED with an additional 32 levels
> +  brightness adjustment. They can be cascaded so that multiple LEDs can be set
> +  with a single command.
> +
> +properties:
> +  compatible:
> +    const: shiji,apa102c
> +
> +  reg:
> +    maxItems: 1
> +
> +  spi-max-frequency:
> +    maximum: 1000000
> +
> +  "#address-cells":
> +    const: 1
> +
> +  "#size-cells":
> +    const: 0
> +
> +patternProperties:
> +  "^rgb-led@[0-9]+$":
> +    type: object
> +    description: |
> +      Array of connected RGB LEDs.

This should reference leds/common.yaml:

allOf:
  - $ref: common.yaml#

> +
> +    properties:
> +      reg:
> +        description: |
> +          This property corresponds to the led index. It has to be between 0
> +          and the number of managed leds minus 1
> +        maxItems: 1
> +
> +      label:
> +        description: |
> +          This property corresponds to the name of the RGB led.
> +        maxItems: 1
> +
> +      linux,default-trigger: true
> +
> +      "#address-cells":
> +        const: 1
> +
> +      "#size-cells":
> +        const: 0
> +
> +    required:
> +      - reg
> +      - label
> +      - '#address-cells'
> +      - '#size-cells'
> +
> +required:
> +  - compatible
> +  - reg
> +  - spi-max-frequency
> +  - '#address-cells'
> +  - '#size-cells'

Add:

additionalProperties: false

> +
> +examples:
> +  - |
> +    spi {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +        led-controller@0 {
> +            compatible = "shiji,apa102c";
> +            reg = <0>;
> +            spi-max-frequency = <1000000>;
> +            #address-cells = <1>;
> +            #size-cells = <0>;
> +            rgb-led@0 {
> +                #address-cells = <1>;
> +                #size-cells = <0>;
> +                reg = <0>;
> +                label = "rgb_led1";
> +            };
> +            rgb-led@1 {
> +                #address-cells = <1>;
> +                #size-cells = <0>;
> +                reg = <1>;
> +                label = "rgb_led2";
> +            };
> +        };
> +    };
> -- 
> 2.7.4
> 

  parent reply	other threads:[~2020-03-13 13:06 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-03-06 13:40 [PATCH v3 0/3] leds: add support for apa102c leds Nicolas Belin
2020-03-06 13:40 ` [PATCH v3 1/3] dt-bindings: Document shiji vendor-prefix Nicolas Belin
2020-03-09 21:05   ` Rob Herring
2020-03-06 13:40 ` [PATCH v3 2/3] dt-bindings: leds: Shiji Lighting APA102C LED Nicolas Belin
2020-03-06 20:19   ` Jacek Anaszewski
2020-03-13 13:06   ` Rob Herring [this message]
2020-03-06 13:40 ` [PATCH v3 3/3] drivers: leds: add support for apa102c leds Nicolas Belin
2020-03-06 20:20   ` Jacek Anaszewski
2020-03-09  9:59     ` Nicolas Belin
2020-03-24  9:42   ` Pavel Machek

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=20200313130620.GA19369@bogus \
    --to=robh@kernel.org \
    --cc=baylibre-upstreaming@groups.io \
    --cc=devicetree@vger.kernel.org \
    --cc=dmurphy@ti.com \
    --cc=jacek.anaszewski@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=nbelin@baylibre.com \
    --cc=pavel@ucw.cz \
    /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 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.