Re: [PATCH v2 1/2] dt-bindings: spi: Document binding for generic SPI multiplexer

From: Rob Herring
Date: Mon Jan 27 2020 - 08:56:26 EST


On Sun, Jan 26, 2020 at 2:24 PM Chris Packham
<Chris.Packham@xxxxxxxxxxxxxxxxxxx> wrote:
>
> On Thu, 2020-01-23 at 07:51 -0600, Rob Herring wrote:
> > On Wed, Jan 22, 2020 at 7:24 PM Chris Packham
> > <chris.packham@xxxxxxxxxxxxxxxxxxx> wrote:
> > >
> > > Add binding documentation for the spi-mux driver. This allows a generic
> > > multiplexer to be used to provide access to multiple SPI devices.
> > >
> > > Signed-off-by: Chris Packham <chris.packham@xxxxxxxxxxxxxxxxxxx>
> > > ---
> > >
> > > Notes:
> > > Changes in v2:
> > > - update license
> > > - make dt_binding_check clean
> >
> > Sure about that?
> >
>
> I was when I wrote that, but now I think I need to consult my spell
> book.
>
> It appears the incantation I should be using is
>
> make ARCH=arm defconfig
> make ARCH=arm dt_binding_check \
> DT_SCHEMA_FILES=Documentation/devicetree/bindings/spi/spi-mux.yaml

Note that you need to run this also without DT_SCHEMA_FILES set so the
example is checked against all schema. With that, the 'spi' node is
going to need #address-cells and #size-cells.

>
> I can see the simple failures (not sure how I missed them). But one
> that remains is:
>
> Warning (spi_bus_bridge): /example-0/spi/spi-mux@0: node name for SPI
> buses should be 'spi'
>
> I could fix that by having
>
> spi {
> spi@0 {
> compatible = "spi-mux";
> };
> };
>
> Is that what we want? Or should I be adding awareness of spi-muxes to
> dtc?

We should probably relax dtc, but for now I'd just use 'spi'.

Rob