Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Jonathan Santos" <Jonathan.Santos@analog.com>,
	devicetree@vger.kernel.org
Cc: robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v4 2/9] dt-bindings: iio: adc: ad7768-1: Document multidevice support
Date: Wed, 21 Oct 2026 02:08:37 +0000	[thread overview]
Message-ID: <sashiko-outbox-179683@kernel.org> (raw)
In-Reply-To: <6e2176d5547c59c39bb692e9768d7ac079b40f71.1792435248.git.Jonathan.Santos@analog.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] dt-bindings: iio: adc: ad7768-1: missing schema constraints on spi-rx-bus-width
--

commit 6ac23a15419b8807e67f7b54e0a33ca605e1e6c8
Author: Jonathan Santos <Jonathan.Santos@analog.com>

dt-bindings: iio: adc: ad7768-1: Document multidevice support

This commit updates the adi,ad7768-1 device tree binding to support
aggregating up to four devices on a single spi controller using multiple
reg entries, spi-rx-bus-width, and spi-cs-composite.

> diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml
> index 7b72d14e104c2..64c1cbeaa5762 100644
> --- a/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml
> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml
> @@ -26,7 +26,10 @@ properties:
>        - adi,adaq7769-1
>  
>    reg:
> -    maxItems: 1
> +    minItems: 1
> +    maxItems: 4
> +    description:
> +      Chip select number. For multi-device setups, one entry per device.
>  
>    clocks:
>      maxItems: 1
> @@ -109,6 +112,12 @@ properties:
>    reset-gpios:
>      maxItems: 1
>  
> +  spi-rx-bus-width:
> +    description:
> +      Bus width per CS. For multi-device setups (multiple reg entries), one
> +      entry per device must be provided. Required when reg has more than
> +      one entry.
> +
>    spi-cpol: true
>  
>    spi-cpha: true
> @@ -203,6 +212,16 @@ allOf:
>        properties:
>          pga-gpios: false
>  
> +  # Required properties for multi-device setups
> +  - if:
> +      properties:
> +        reg:
> +          minItems: 2
> +    then:
> +      required:
> +        - spi-rx-bus-width
> +        - spi-cs-composite
> +
>  unevaluatedProperties: false

[Severity: Low]
In Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml,
properties:spi-rx-bus-width only adds a description without constraining
minItems, maxItems, or the per-item value. Because this binding references
spi-peripheral-props.yaml, spi-rx-bus-width inherits an unbounded
uint32-array allowing values from [0, 1, 2, 4, 8] even though each ad7768-1
device uses a single 1-bit data lane and at most four devices can be
aggregated.

Also, in the allOf conditional block for reg with minItems: 2, the then
branch marks spi-rx-bus-width and spi-cs-composite as required, but does
not require minItems: 2 on spi-rx-bus-width or disallow spi-cs-composite
when reg has only one entry.

If a device tree node for adi,ad7768-1 specifies multiple reg entries with
only a single spi-rx-bus-width entry, or specifies unsupported bus widths
or more than four lanes, it will pass dt_binding_check and then fail at
probe time in devm_spi_new_ancillary_device_with_lane() when rx_lane_idx >=
spi->num_rx_lanes.

Should properties:spi-rx-bus-width specify minItems: 1, maxItems: 4, and
items: const: 1 (similar to
Documentation/devicetree/bindings/iio/adc/adi,ad7380.yaml), and should the
allOf entry enforce minItems: 2 on spi-rx-bus-width when reg has
minItems: 2?

[ ... ]

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1792435248.git.Jonathan.Santos@analog.com?part=2

  reply	other threads:[~2026-10-21  2:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-21  1:56 [PATCH v4 0/9] spi: add multi-CS and multi-chip aggregation support Jonathan Santos
2026-10-21  1:56 ` [PATCH v4 1/9] spi: dt-bindings: Add spi-cs-composite property Jonathan Santos
2026-10-21  1:56 ` [PATCH v4 2/9] dt-bindings: iio: adc: ad7768-1: Document multidevice support Jonathan Santos
2026-10-21  2:08   ` sashiko-bot [this message]
2026-10-21  1:57 ` [PATCH v4 3/9] spi: support simultaneous assertion of multiple CS Jonathan Santos
2026-10-21  1:57 ` [PATCH v4 4/9] spi: restrict CS logical values to a contiguous sequence Jonathan Santos
2026-10-21  2:09   ` sashiko-bot
2026-10-21  1:57 ` [PATCH v4 5/9] spi: expand device name to include enabled CS lines for multi-CS devices Jonathan Santos
2026-10-21  1:58 ` [PATCH v4 6/9] spi: introduce SPI ancillary device with lanes Jonathan Santos
2026-10-21  1:58 ` [PATCH v4 7/9] spi: add KUnit tests for the multi-CS framework Jonathan Santos
2026-10-21  2:08   ` sashiko-bot
2026-10-21  1:58 ` [PATCH v4 8/9] spi: spi-engine-ex: Add support for multi-CS devices Jonathan Santos
2026-10-21  1:58 ` [PATCH v4 9/9] iio: adc: ad7768-1: add support for multiple chip aggregation Jonathan Santos
2026-10-21  2:11   ` 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=sashiko-outbox-179683@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=Jonathan.Santos@analog.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@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