Re: [PATCH v3 1/6] dt-bindings: iio: adc: ad7768-1: Document multidevice support

Nuno Sá <[email protected]>
Newsgroups org.kernel.vger.linux-kernel,org.kernel.vger.linux-spi
Message-ID <aoR1Uo2W5BtiYRSY@nsa>
On Tue, Aug 18, 2026 at 10:02:50AM -0500, David Lechner wrote:
> On 8/17/26 6:32 PM, Jonathan Santos wrote:
> > The AD7768-1 family supports aggregating up to four devices on a single
> > SPI controller, with each device occupying a dedicated CS line and a
> > single data lane.
> > 
> > Extend the `reg` property to accept up to 4 entries (one per device).
> > 
> > Add `spi-rx-bus-width` property to declare the per-device lane count.
> > Since each lane is bound to one CS, the number of entries must match
> > `reg`. Make it required when `reg` has more than one entry.
> > 
> I don't see why we should have to require the spi-rx-bus-width property.
> It seems logical that if it is not present, then we would assume one
> lane per CS. This is already how bindings work.
> 
> For example, adi,ad4080 and ge,achc have multiple CS lines and don't
> require any bus width properties.

Hmm that's my default then! I was the one requesting it. Basically
because of:

https://elixir.bootlin.com/linux/v7.2/source/Documentation/devicetree/bindings/spi/spi-peripheral-props.yaml#L76

So I thought that $refing spi-peripheral-props.yaml and leaving the
default value would make dtbs_check to fail if one used 

spi-rx-bus-width = <1>, <1>, <1>, <1>;

in DT. 

Won't it fail?

And if we don't give the property I believe we'll have:

https://elixir.bootlin.com/linux/v7.2/source/drivers/spi/spi.c#L2509

And given these series assumption of spi->num_rx_lanes == number of
devices (which I don't agree btw), I thought we would need to make
spi-rx-bus-width  explicit in our bindings! I still think but I might be
wrong and I'm by no means an expert on dt bindings schemas work :)

- Nuno Sá

>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.