Re: [PATCH] spi: dt-bindings: spi-controller: Fix #address-cells for slave mode

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thu, Feb 27, 2020 at 02:19:08PM +0100, Geert Uytterhoeven wrote:
> Hi Maxime,
>
> On Thu, Feb 27, 2020 at 2:09 PM Maxime Ripard <maxime@xxxxxxxxxx> wrote:
> > On Thu, Feb 27, 2020 at 02:03:23PM +0100, Geert Uytterhoeven wrote:
> > > Currently, the DT bindings for an SPI controller specify that
> > > "#address-cells" must be fixed to one.  However, that applies to an SPI
> > > controller in master mode only.  When running in SPI slave mode,
> > > "#address-cells" should be zero.
> > >
> > > Fix this making the value of "#address-cells" dependent on the presence
> > > of "spi-slave".
> > >
> > > Fixes: 0a1b929356830257 ("spi: Add YAML schemas for the generic SPI options")
> > > Reported-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@xxxxxxxxxxx>
> > > Signed-off-by: Geert Uytterhoeven <geert+renesas@xxxxxxxxx>
>
> > > --- a/Documentation/devicetree/bindings/spi/spi-controller.yaml
> > > +++ b/Documentation/devicetree/bindings/spi/spi-controller.yaml
>
> > > @@ -52,6 +53,18 @@ properties:
> > >      description:
> > >        The SPI controller acts as a slave, instead of a master.
> > >
> > > +if:
> > > +  required:
> > > +    [ spi-slave ]
> >
> > Nit: Usually, that notation is when you would do it on the same line,
> > if you want to go to a new line, it would make more sense to use -
>
> Sorry, being a poor yaml-by-example programmer, I don't understand what
> you mean.  Which part do you refer to by "that notation"?

I meant that usually the [] notation is used over a single line.

If you want to have a list over multiple lines, usually you would have

required:
  - spi-slave

Maxime

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux