From: Conor Dooley <conor@kernel.org>
To: Loic Poulain <loic.poulain@oss.qualcomm.com>
Cc: Lee Jones <lee@kernel.org>, Pavel Machek <pavel@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Laurent Pinchart <laurent.pinchart@ideasonboard.com>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
linux-leds@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-arm-msm@vger.kernel.org
Subject: Re: [PATCH v3 2/4] dt-bindings: leds: nxp,pca963x: add multicolor LED support
Date: Mon, 6 Jul 2026 17:56:40 +0100 [thread overview]
Message-ID: <20260706-account-harsh-093c6354bca5@spud> (raw)
In-Reply-To: <20260706-monza-leds-v3-2-37ea8c988363@oss.qualcomm.com>
[-- Attachment #1: Type: text/plain, Size: 5209 bytes --]
On Mon, Jul 06, 2026 at 05:49:56PM +0200, Loic Poulain wrote:
> Add support for grouping individual PCA963x channels into a multicolor
> LED by introducing a multi-led@N node pattern. This follows the
> convention established by other multicolor LED drivers such as
> kinetic,ktd202x.
>
> This is necessary to support and model hardware setups where multiple
> PWM channels drive a single physical RGB LED.
>
> Signed-off-by: Loic Poulain <loic.poulain@oss.qualcomm.com>
> ---
> .../devicetree/bindings/leds/nxp,pca963x.yaml | 104 ++++++++++++++++++++-
> 1 file changed, 101 insertions(+), 3 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/leds/nxp,pca963x.yaml b/Documentation/devicetree/bindings/leds/nxp,pca963x.yaml
> index 4034139e3f770a1035208490a9436bdc33387279..dccdb1d9421199a51cac5c7f3f7da503caa35622 100644
> --- a/Documentation/devicetree/bindings/leds/nxp,pca963x.yaml
> +++ b/Documentation/devicetree/bindings/leds/nxp,pca963x.yaml
> @@ -74,6 +74,40 @@ patternProperties:
> required:
> - reg
>
> + "^multi-led@[0-9a-f]+$":
> + type: object
> + $ref: leds-class-multicolor.yaml#
> + unevaluatedProperties: false
> +
> + properties:
> + reg:
> + minimum: 0
I still don't understand this, minimum zero is literally useless since
this cannot be negative.
If anything, you should be constraining the maximum value. Remember,
outside of conditional sections the maximum permitted values should be
defined. Conditional sections should just narrow the constraints.
Same below.
pw-bot: changes-requested
> +
> + "#address-cells":
> + const: 1
> +
> + "#size-cells":
> + const: 0
> +
> + patternProperties:
> + "^led@[0-9a-f]+$":
> + type: object
> + $ref: common.yaml#
> + unevaluatedProperties: false
> +
> + properties:
> + reg:
> + minimum: 0
> +
> + required:
> + - reg
> + - color
> +
> + required:
> + - reg
> + - "#address-cells"
> + - "#size-cells"
> +
> allOf:
> - if:
> properties:
> @@ -84,10 +118,16 @@ allOf:
> - nxp,pca9633
> then:
> patternProperties:
> - "^led@[0-9a-f]+$":
> + "^.*led@[0-9a-f]+$":
> properties:
> reg:
> maximum: 3
> + "^multi-led@[0-9a-f]+$":
> + patternProperties:
> + "^led@[0-9a-f]+$":
> + properties:
> + reg:
> + maximum: 3
> - if:
> properties:
> compatible:
> @@ -96,16 +136,28 @@ allOf:
> - nxp,pca9634
> then:
> patternProperties:
> - "^led@[0-9a-f]+$":
> + "^.*led@[0-9a-f]+$":
> properties:
> reg:
> maximum: 7
> + "^multi-led@[0-9a-f]+$":
> + patternProperties:
> + "^led@[0-9a-f]+$":
> + properties:
> + reg:
> + maximum: 7
> else:
> patternProperties:
> - "^led@[0-9a-f]+$":
> + "^.*led@[0-9a-f]+$":
> properties:
> reg:
> maximum: 15
> + "^multi-led@[0-9a-f]+$":
> + patternProperties:
> + "^led@[0-9a-f]+$":
> + properties:
> + reg:
> + maximum: 15
Is this 15 the maximum for all devices?
If so, why does your regex permit values greater than 15?
Cheers,
Conor.
>
> additionalProperties: false
>
> @@ -149,4 +201,50 @@ examples:
> };
> };
>
> + - |
> + #include <dt-bindings/leds/common.h>
> +
> + i2c {
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + led-controller@62 {
> + compatible = "nxp,pca9633";
> + reg = <0x62>;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + /* Three channels controlling one RGB LED */
> + multi-led@0 {
> + reg = <0>;
> + color = <LED_COLOR_ID_RGB>;
> + function = LED_FUNCTION_STATUS;
> + #address-cells = <1>;
> + #size-cells = <0>;
> +
> + led@0 {
> + reg = <0>;
> + color = <LED_COLOR_ID_RED>;
> + };
> +
> + led@1 {
> + reg = <1>;
> + color = <LED_COLOR_ID_GREEN>;
> + };
> +
> + led@2 {
> + reg = <2>;
> + color = <LED_COLOR_ID_BLUE>;
> + };
> + };
> +
> + /* Remaining channel used as a plain white LED */
> + led@3 {
> + reg = <3>;
> + color = <LED_COLOR_ID_WHITE>;
> + function = LED_FUNCTION_STATUS;
> + };
> + };
> + };
> +
> ...
>
> --
> 2.34.1
>
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
next prev parent reply other threads:[~2026-07-06 16:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-06 15:49 [PATCH v3 0/4] leds: pca963x: Add multicolor support and enable Monza RGB LEDs Loic Poulain
2026-07-06 15:49 ` [PATCH v3 1/4] dt-bindings: leds: nxp,pca963x: fix reg maximum for pca9635 Loic Poulain
2026-07-06 15:54 ` sashiko-bot
2026-07-06 15:49 ` [PATCH v3 2/4] dt-bindings: leds: nxp,pca963x: add multicolor LED support Loic Poulain
2026-07-06 15:54 ` sashiko-bot
2026-07-06 16:56 ` Conor Dooley [this message]
2026-07-06 15:49 ` [PATCH v3 3/4] leds: pca963x: add multicolor LED class support Loic Poulain
2026-07-06 16:04 ` sashiko-bot
2026-07-06 15:49 ` [PATCH v3 4/4] arm64: dts: monaco-arduino-monza: microcontroller LEDs Loic Poulain
2026-07-06 15:57 ` sashiko-bot
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=20260706-account-harsh-093c6354bca5@spud \
--to=conor@kernel.org \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=laurent.pinchart@ideasonboard.com \
--cc=lee@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-leds@vger.kernel.org \
--cc=loic.poulain@oss.qualcomm.com \
--cc=pavel@kernel.org \
--cc=robh@kernel.org \
/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