Thread (11 messages) 11 messages, 4 authors, 15d ago

Re: [PATCH v7 1/3] dt-bindings: leds: rt8515: Support single-GPIO flash ICs with vin supply

From: sashiko-bot@kernel.org
Date: 2026-09-13 02:45:10
Also in: linux-leds

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 [off-list ref]
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.
quoted hunk ↗ jump to hunk
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
[ ... ]
quoted hunk ↗ jump to hunk
@@ -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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help