mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
To: linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, marcelo.schmitt1@gmail.com
Cc: Marcelo Schmitt <marcelo.schmitt@analog.com>,
	robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v4 08/13] dt-bindings: iio: adc: adi,ad4134: Document SPI connection mode
Date: Tue, 13 Oct 2026 18:06:01 -0300	[thread overview]
Message-ID: <as6dOTPvdfCtgtJg@debian-BULLSEYE-live-builder-AMD64> (raw)
In-Reply-To: <sashiko-outbox-162344@kernel.org>

On 10/06, sashiko-bot@kernel.org wrote:
> Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
> - [Low] dt-bindings: invalid and incomplete constraints for spi-rx-bus-width
> --
> 
> commit a58d6d0037332b8cd9f5b3717ec4b6ddd8e36734
> Author: Marcelo Schmitt <marcelo.schmitt@analog.com>
> 
> dt-bindings: iio: adc: adi,ad4134: Document SPI connection mode
> 
> This commit updates the AD4134 device tree bindings to document different SPI 
> connection modes. It introduces the adi,spi-mode and #daisy-chained-devices 
> properties along with corresponding constraints for 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..970e7adb2405b 100644
> > --- a/Documentation/devicetree/bindings/iio/adc/adi,ad4134.yaml
> > +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad4134.yaml
> [ ... ]
> > @@ -141,13 +161,36 @@ required:
> >    - clocks
> >    - clock-names
> >  
> > -oneOf:
> > -  - required:
> > -      - ldoin-supply
> > -  - required:
> > -      - avdd1v8-supply
> > -      - dvdd1v8-supply
> > -      - clkvdd-supply
> > +allOf:
> > +  - oneOf:
> > +      - required:
> > +          - ldoin-supply
> > +      - required:
> > +          - avdd1v8-supply
> > +          - dvdd1v8-supply
> > +          - clkvdd-supply
> > +
> > +  - oneOf:
> > +      - required: ['adi,spi-mode', '#daisy-chained-devices']
> 
> [Severity: Low]
> Neither chain configuration includes spi-rx-bus-width in the required list.
> 
> Since JSON Schema property constraints only evaluate when the property is 
> present, omitting spi-rx-bus-width from a chain node bypasses the hardware 
> constraint. 
> 
> Should spi-rx-bus-width be added to the required lists so the SPI controller 
> doesn't silently initialize with a single receive lane?

I don't think that would necessarily be a problem.

> 
> > +        properties:
> > +          adi,spi-mode:
> > +            const: one-channel-chain
> > +          spi-rx-bus-width:
> > +            const: 1
> 
> [Severity: Low]
> Because the core SPI bindings define spi-rx-bus-width as a uint32-array, 
> evaluating a device tree value (such as <1>, parsed internally as the JSON 
> array [1]) against a scalar causes a strict type mismatch. 
> 
> Could this falsely reject valid configurations during dt_binding_check?

When spi-rx-bus-width = <1>; the property can be omitted and the pair
#daisy-chained-devices = <N>;
adi,spi-mode = "one-channel-chain";
passes dt_binding_check.

> 
> > +      - required: ['adi,spi-mode', '#daisy-chained-devices']
> > +        properties:
> > +          adi,spi-mode:
> > +            const: two-channel-chain
> > +          spi-rx-bus-width:
> > +            items:
> > +              - const: 1
> > +              - const: 1
> 
> [Severity: Low]
> This array items constraint validates the first two lanes, but it lacks bounds 
> checks. 
> 
> Does this need minItems: 2 and maxItems: 2 to properly restrict the overall 
> length of the array?

I've tried that before preparing v4 and the result was dt_binding_check hints.
'hint: "maxItems" is not needed with an "items" list'
'hint: "minItems" is only needed if less than the "items" list length'

> 
> > +      - properties:
> > +          '#daisy-chained-devices': false
> > +          adi,spi-mode:
> > +            enum:
> > +              - no-cs
> > +              - 4-wire
> 
> -- 
> Sashiko AI review · https://sashiko.dev/#/patchset/cover.1791309733.git.marcelo.schmitt@analog.com?part=8

  parent reply	other threads:[~2026-10-13 21:05 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-06 18:15 [PATCH v4 00/13] iio: adc: ad4134: Enable greater sample rate data capture Marcelo Schmitt
2026-10-06 18:16 ` [PATCH v4 01/13] iio: adc: ad4134: Adjust register map range Marcelo Schmitt
2026-10-14 16:55   ` Nuno Sá
2026-10-06 18:16 ` [PATCH v4 02/13] iio: adc: ad4134: Sign extend sample data Marcelo Schmitt
     [not found]   ` <sashiko-outbox-162349@kernel.org>
2026-10-13 20:52     ` Marcelo Schmitt
2026-10-14 16:55   ` Nuno Sá
2026-10-06 18:16 ` [PATCH v4 03/13] iio: adc: ad4134: Update include list to comply with IWYU principles Marcelo Schmitt
2026-10-14 16:55   ` Nuno Sá
2026-10-06 18:17 ` [PATCH v4 04/13] iio: adc: ad4134: Serialize single-read operations Marcelo Schmitt
2026-10-14 16:55   ` Nuno Sá
2026-10-06 18:17 ` [PATCH v4 05/13] iio: adc: ad4134: Run shorter transfers when CRC is disabled Marcelo Schmitt
     [not found]   ` <sashiko-outbox-162348@kernel.org>
2026-10-13 20:56     ` Marcelo Schmitt
2026-10-14 16:00       ` Nuno Sá
2026-10-14 16:55   ` Nuno Sá
2026-10-06 18:17 ` [PATCH v4 06/13] iio: adc: ad4134: Add support for digital filter type selection Marcelo Schmitt
2026-10-14 16:55   ` Nuno Sá
2026-10-06 18:17 ` [PATCH v4 07/13] iio: adc: ad4134: Support buffered data read Marcelo Schmitt
2026-10-13  7:20   ` Andy Shevchenko
2026-10-13 21:14     ` Marcelo Schmitt
2026-10-14 16:55   ` Nuno Sá
2026-10-06 18:18 ` [PATCH v4 08/13] dt-bindings: iio: adc: adi,ad4134: Document SPI connection mode Marcelo Schmitt
2026-10-07 10:14   ` Conor Dooley
     [not found]   ` <sashiko-outbox-162344@kernel.org>
2026-10-13 21:06     ` Marcelo Schmitt [this message]
2026-10-06 18:18 ` [PATCH v4 09/13] dt-bindings: iio: adc: adi,ad4134: Document external multiplexer usage Marcelo Schmitt
2026-10-06 18:19 ` [PATCH v4 10/13] iio: adc: ad4134: Support SPI 4-wire mode Marcelo Schmitt
     [not found]   ` <sashiko-outbox-162354@kernel.org>
2026-10-13 21:10     ` Marcelo Schmitt
2026-10-14 16:57       ` Nuno Sá
2026-10-14 16:55   ` Nuno Sá
2026-10-17  0:57     ` Marcelo Schmitt
2026-10-06 18:19 ` [PATCH v4 11/13] dt-bindings: iio: adc: adi,ad4134: Document PWM usage Marcelo Schmitt
2026-10-06 18:19 ` [PATCH v4 12/13] iio: adc: ad4134: Support high-speed data capture Marcelo Schmitt
2026-10-06 18:19 ` [PATCH v4 13/13] 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=as6dOTPvdfCtgtJg@debian-BULLSEYE-live-builder-AMD64 \
    --to=marcelo.schmitt1@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.schmitt@analog.com \
    --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

all inboxes | Powered by JetHome®