From: sashiko-bot@kernel.org
To: "Marcelo Schmitt" <marcelo.schmitt@analog.com>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH v2 09/15] dt-bindings: iio: adc: adi,ad4134: Document SPI connection mode
Date: Tue, 15 Sep 2026 19:26:39 +0000 [thread overview]
Message-ID: <20260915192640.636AF1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <304d10f12a3418fbd5598160609a6eda09ed4100.1789494473.git.marcelo.schmitt@analog.com>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] dt-bindings: invalid DTS syntax in spi-rx-bus-width const constraints
- [Medium] dt-bindings: schema allows bypassing daisy-chained-devices requirement
--
commit 879c8beee9c21345a2925282a985c10001e710eb
Author: Marcelo Schmitt <marcelo.schmitt@analog.com>
dt-bindings: iio: adc: adi,ad4134: Document SPI connection mode
Document how AD4134 chips are connected to the host SPI controller
according to different wiring configurations.
> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad4134.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad4134.yaml
> index ea6d7e0264190..012e09decf7af 100644
> --- a/Documentation/devicetree/bindings/iio/adc/adi,ad4134.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad4134.yaml
[ ... ]
> + - oneOf:
> + - required: [adi,spi-mode, '#daisy-chained-devices']
> + properties:
> + adi,spi-mode:
> + const: one-channel-chain
> + spi-rx-bus-width:
> + const: <1>
[Severity: Medium]
Will this assignment of <1> to const cause a type mismatch during schema
validation?
Since the YAML parser evaluates <1> as a literal string instead of an integer
array, it appears that when a device tree specifies a mode like
adi,spi-mode = "one-channel-chain" and provides a valid integer for
spi-rx-bus-width = <1>, it will unconditionally fail validation.
> + - required: [adi,spi-mode, '#daisy-chained-devices']
> + properties:
> + adi,spi-mode:
> + const: two-channel-chain
> + spi-rx-bus-width:
> + const: <1>, <1>
[Severity: Medium]
Does this string literal assignment also trigger a type mismatch when validating
a two-channel-chain configuration?
> + - properties:
> + '#daisy-chained-devices': false
[Severity: Medium]
Can the fallback branch in this oneOf block inadvertently bypass the required
constraints?
If a device tree completely omits the #daisy-chained-devices property, this
catch-all branch seems to trivially evaluate to true, because property
constraints in JSON Schema only evaluate if the property is actually present.
If the branch evaluates to true, the outer oneOf block succeeds. This appears
to circumvent the mandatory #daisy-chained-devices requirement, allowing
incomplete configurations to pass validation when adi,spi-mode is set to one
of the chain modes.
--
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1789494473.git.marcelo.schmitt@analog.com?part=9
next prev parent reply other threads:[~2026-09-15 19:26 UTC|newest]
Thread overview: 37+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-15 19:11 [PATCH v2 00/15] iio: adc: ad4134: Enable greater sample rate data capture Marcelo Schmitt
2026-09-15 19:11 ` [PATCH v2 01/15] iio: adc: ad4134: Sign extend sample data Marcelo Schmitt
2026-09-15 19:28 ` sashiko-bot
2026-09-21 1:50 ` Jonathan Cameron
2026-09-15 19:12 ` [PATCH v2 02/15] iio: Fix typo in vendor name Marcelo Schmitt
2026-09-21 1:50 ` Jonathan Cameron
2026-09-15 19:12 ` [PATCH v2 03/15] iio: adc: ad4134: Drop import to empty name space Marcelo Schmitt
2026-09-21 1:19 ` Jonathan Cameron
2026-09-15 19:13 ` [PATCH v2 04/15] iio: adc: ad4134: Update include list to comply with IWYU principles Marcelo Schmitt
2026-09-15 19:13 ` [PATCH v2 05/15] iio: adc: ad4134: Serialize single-read operations Marcelo Schmitt
2026-09-15 19:13 ` [PATCH v2 06/15] iio: adc: ad4134: Run shorter transfers when CRC is disabled Marcelo Schmitt
2026-09-15 19:14 ` [PATCH v2 07/15] iio: adc: ad4134: Add support for digital filter type selection Marcelo Schmitt
2026-09-15 19:14 ` [PATCH v2 08/15] iio: adc: ad4134: Support buffered data read Marcelo Schmitt
2026-09-15 19:29 ` sashiko-bot
2026-09-21 1:50 ` Jonathan Cameron
2026-09-21 15:12 ` Marcelo Schmitt
2026-09-15 19:14 ` [PATCH v2 09/15] dt-bindings: iio: adc: adi,ad4134: Document SPI connection mode Marcelo Schmitt
2026-09-15 19:26 ` sashiko-bot [this message]
2026-09-15 21:57 ` Rob Herring (Arm)
2026-09-16 16:00 ` Rob Herring
2026-09-17 3:30 ` Jonathan Cameron
2026-09-17 16:07 ` Rob Herring
2026-09-17 16:54 ` Marcelo Schmitt
2026-09-15 19:15 ` [PATCH v2 10/15] dt-bindings: iio: adc: adi,ad4134: Document external multiplexer usage Marcelo Schmitt
2026-09-21 1:34 ` Jonathan Cameron
2026-09-15 19:15 ` [PATCH v2 11/15] iio: adc: ad4134: Support SPI 4-wire mode Marcelo Schmitt
2026-09-15 19:49 ` sashiko-bot
2026-09-21 1:50 ` Jonathan Cameron
2026-09-15 19:15 ` [PATCH v2 12/15] dt-bindings: iio: adc: adi,ad4134: Document PWM usage Marcelo Schmitt
2026-09-15 19:16 ` [PATCH v2 13/15] dt-bindings: iio: adc: adi,ad4134: Add high data throughput example Marcelo Schmitt
2026-09-15 19:28 ` sashiko-bot
2026-09-21 1:50 ` Jonathan Cameron
2026-09-24 21:25 ` Rob Herring
2026-09-15 19:16 ` [PATCH v2 14/15] iio: adc: ad4134: Support high-speed data capture Marcelo Schmitt
2026-09-15 19:50 ` sashiko-bot
2026-09-21 1:50 ` Jonathan Cameron
2026-09-15 19:16 ` [PATCH v2 15/15] Docs: iio: Add AD4134 Marcelo Schmitt
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=20260915192640.636AF1F000FF@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=marcelo.schmitt@analog.com \
--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