From mboxrd@z Thu Jan 1 00:00:00 1970 From: Geert Uytterhoeven Subject: Re: [PATCH 1/4] dt-bindings: spi: Add YAML schemas for the generic SPI options Date: Wed, 8 May 2019 09:02:17 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Cc: Mark Rutland , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Maxime Ripard , linux-spi , Chen-Yu Tsai , Mark Brown , Frank Rowand , "moderated list:ARM/FREESCALE IMX / MXC ARM ARCHITECTURE" To: Rob Herring Return-path: In-Reply-To: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=m.gmane.org@lists.infradead.org List-Id: linux-spi.vger.kernel.org On Tue, May 7, 2019 at 4:35 PM Rob Herring wrote: > On Tue, May 7, 2019 at 8:48 AM Maxime Ripard wrote: > > The SPI controllers have a bunch of generic options that are needed in a > > device tree. Add a YAML schemas for those. > > > > Signed-off-by: Maxime Ripard > > index 1f6e86f787ef..000000000000 > > --- a/Documentation/devicetree/bindings/spi/spi-bus.txt > > +++ /dev/null > > -In master mode, the SPI controller node requires the following additional > > -properties: > > -- #address-cells - number of cells required to define a chip select > > - address on the SPI bus. > > -- #size-cells - should be zero. > > - > > -In slave mode, the SPI controller node requires one additional property: > > -- spi-slave - Empty property. > > --- /dev/null > > +++ b/Documentation/devicetree/bindings/spi/spi-controller.yaml > > + spi-slave: > > + $ref: /schemas/types.yaml#/definitions/flag > > "type: boolean" is sufficient here. Maybe we should just remove > 'flag'. OTOH, maybe consistency with other types and the abstraction > is better as we could add to the flag schema. > > > + description: > > + The SPI controller acts as a slave, instead of a master. > > + > > +required: > > + - "#address-cells" > > + - "#size-cells" > > Only if there are child nodes... ... and spi-slave is not present. Gr{oetje,eeting}s, Geert -- Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that. -- Linus Torvalds