devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Timothy Pearson <tpearson@raptorengineering.com>,
	devicetree <devicetree@vger.kernel.org>,
	linux-kernel <linux-kernel@vger.kernel.org>,
	Rob Herring <robh+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Lee Jones <lee@kernel.org>,
	Georgy Yakovlev <Georgy.Yakovlev@sony.com>
Subject: Re: [PATCH v4 1/4] dt-bindings: mfd: Add sony,cronos-smc
Date: Tue, 21 Oct 2025 12:44:20 +0200	[thread overview]
Message-ID: <c7630eb1-2686-491e-81ed-fb43fff2dd31@linaro.org> (raw)
In-Reply-To: <1587929609.1802041.1760983921227.JavaMail.zimbra@raptorengineeringinc.com>

On 20/10/2025 20:12, Timothy Pearson wrote:
> +
> +properties:
> +  compatible:
> +    const: sony,cronos-smc
> +
> +  reg:
> +    maxItems: 1
> +
> +  timeout-sec: true

Drop, not needed.

> +
> +  leds:
> +    type: object
> +    additionalProperties: false
> +    description: |
> +      The Cronos LED controller is a subfunction of the Cronos platform
> +      controller, which is a multi-function device.
> +
> +      Each led is represented as a child node of sony,cronos-led. Fifteen RGB
> +      LEDs are supported by the platform.

Fifteen?

> +
> +    properties:
> +      compatible:
> +        const: sony,cronos-led
> +
> +      reg:
> +        maxItems: 1
> +
> +      "#address-cells":
> +        const: 1
> +
> +      "#size-cells":
> +        const: 0
> +
> +    patternProperties:
> +      "^multi-led@[0-15]$":

Unit addresses are hex.

> +        type: object
> +        $ref: leds-class-multicolor.yaml#
> +        unevaluatedProperties: false
> +
> +        properties:
> +          reg:
> +            description:
> +              LED channel number (0..15)

but here is sixteen...

> +            minimum: 0
> +            maximum: 15
> +
> +        required:
> +          - reg
> +
> +    required:
> +      - compatible
> +      - "#address-cells"
> +      - "#size-cells"
> +
> +required:
> +  - compatible
> +  - reg
> +
> +allOf:
> +  - $ref: /schemas/watchdog/watchdog.yaml

Come with sensible, generic node name and update the schema like I did.
https://devicetree-specification.readthedocs.io/en/latest/chapter2-devicetree-basics.html#generic-names-recommendation

> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +
> +    #include <dt-bindings/leds/common.h>
> +
> +    i2c {
> +      #address-cells = <1>;
> +      #size-cells = <0>;
> +
> +      smc@3f {
> +        compatible = "sony,cronos-smc";
> +        reg = <0x3f>;
> +
> +        timeout-sec = <20>;
> +
> +        leds {
> +            compatible = "sony,cronos-led";

Keep consistent indentation. Use 4 spaces for example indentation.

> +            #address-cells = <1>;
> +            #size-cells = <0>;
> +
> +            multi-led@0 {
> +                /*
> +                 * No subnodes are needed, this controller only supports RGB
> +                 * LEDs.
> +                 */
> +                reg = <0>;
> +                color = <LED_COLOR_ID_MULTI>;
> +                function = LED_FUNCTION_STATUS;
> +            };
> +        };
> +      };
> +    };


Best regards,
Krzysztof

      parent reply	other threads:[~2025-10-21 10:44 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-20 18:10 [PATCH v3 0/4] Add drivers for Sony Cronos control CPLD Timothy Pearson
2025-10-20 18:12 ` [PATCH v4 1/4] dt-bindings: mfd: Add sony,cronos-smc Timothy Pearson
2025-10-20 18:14   ` [PATCH v4 2/4] mfd: sony-cronos-smc: Add driver for Sony Cronos SMC Timothy Pearson
2025-10-20 18:14     ` [PATCH v4 3/4] led: sony-cronos-smc: Add RGB LED " Timothy Pearson
2025-10-20 18:15       ` [PATCH v4 4/4] watchdog: sony-cronos-smc: Add watchdog " Timothy Pearson
2025-10-21 10:41         ` Krzysztof Kozlowski
2025-10-21 10:39     ` [PATCH v4 2/4] mfd: sony-cronos-smc: Add " Krzysztof Kozlowski
2025-10-20 19:52   ` [PATCH v4 1/4] dt-bindings: mfd: Add sony,cronos-smc Rob Herring (Arm)
2025-10-21 10:44   ` Krzysztof Kozlowski [this message]

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=c7630eb1-2686-491e-81ed-fb43fff2dd31@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=Georgy.Yakovlev@sony.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=tpearson@raptorengineering.com \
    /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).