Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Rudraksha Gupta" <guptarud@gmail.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org,
	linux-leds@vger.kernel.org, lee@kernel.org, robh@kernel.org
Subject: Re: [PATCH v7 1/3] dt-bindings: leds: rt8515: Support single-GPIO flash ICs with vin supply
Date: Sun, 13 Sep 2026 02:45:09 +0000	[thread overview]
Message-ID: <20260913024510.485A11F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260912-expressatt_camera_flash-v7-1-e1fd2edc8d84@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The `oneOf` constraint incorrectly makes `ent-gpios` and `vin-supply` mutually exclusive and strictly requires exactly one to be present, contradicting the claim that `vin-supply` is optional and artificially restricting valid hardware configurations.
--

commit 72463777ee1c18e7913b350d5d2ad857810ece89
Author: Rudraksha Gupta <guptarud@gmail.com>
Subject: dt-bindings: leds: rt8515: Support single-GPIO flash ICs with vin supply

This commit adds support for single-channel variants of the RT8515 flash
ICs. It makes ent-gpios optional and introduces a vin-supply property,
adding a oneOf constraint to manage their presence.

> diff --git a/Documentation/devicetree/bindings/leds/richtek,rt8515.yaml b/Documentation/devicetree/bindings/leds/richtek,rt8515.yaml
> index 0356371a6b014..ab3c5139132cc 100644
> --- a/Documentation/devicetree/bindings/leds/richtek,rt8515.yaml
> +++ b/Documentation/devicetree/bindings/leds/richtek,rt8515.yaml

[ ... ]

> @@ -81,10 +90,15 @@ properties:
>  
>  required:
>    - compatible
> -  - ent-gpios
>    - enf-gpios
>    - led
>  
> +oneOf:
> +  - required:
> +      - ent-gpios
> +  - required:
> +      - vin-supply
> +

[Severity: Medium]
Does this oneOf constraint incorrectly restrict valid hardware configurations?

The oneOf constraint strictly requires exactly one of its subschemas to match.
If a single-channel IC (which naturally lacks ent-gpios) does not use the
explicitly optional vin-supply regulator, zero subschemas will match, causing
schema validation to fail.

Conversely, if a standard dual-channel IC (which requires ent-gpios) is also
powered by a vin-supply regulator, two subschemas will match. This will also
fail validation due to the strict exclusivity of oneOf.

Should this be modeled differently to allow vin-supply to be truly optional
while safely permitting single-channel configurations?

>  additionalProperties: false
>  
>  examples:

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260912-expressatt_camera_flash-v7-0-e1fd2edc8d84@gmail.com?part=1

  reply	other threads:[~2026-09-13  2:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-13  2:38 [PATCH v7 0/3] Samsung Expressatt: Camera Flash Rudraksha Gupta via B4 Relay
2026-09-13  2:38 ` [PATCH v7 1/3] dt-bindings: leds: rt8515: Support single-GPIO flash ICs with vin supply Rudraksha Gupta via B4 Relay
2026-09-13  2:45   ` sashiko-bot [this message]
2026-09-13  2:38 ` [PATCH v7 2/3] leds: flash: " Rudraksha Gupta via B4 Relay
2026-09-13  2:50   ` sashiko-bot
2026-09-13  2:38 ` [PATCH v7 3/3] ARM: dts: qcom: msm8960: expressatt: Add camera flash Rudraksha Gupta via B4 Relay
2026-09-13  2:50   ` 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=20260913024510.485A11F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=guptarud@gmail.com \
    --cc=lee@kernel.org \
    --cc=linux-leds@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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