From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Ripard Subject: Re: [PATCH] spi: dt-bindings: spi-controller: Fix #address-cells for slave mode Date: Thu, 27 Feb 2020 14:51:09 +0100 Message-ID: <20200227135109.l2oal55nwhm5un2c@gilmour.lan> References: <20200227130323.15327-1-geert+renesas@glider.be> <20200227130937.qvrjyxcwim7rfum7@gilmour.lan> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="z6z2joa2jqig3ppp" Cc: Mark Brown , Rob Herring , Yoshihiro Shimoda , linux-spi , "open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS" , Linux-renesas To: Geert Uytterhoeven Return-path: Content-Disposition: inline In-Reply-To: Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-Id: linux-spi.vger.kernel.org --z6z2joa2jqig3ppp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline 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 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 > > > Signed-off-by: Geert Uytterhoeven > > > > --- 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 --z6z2joa2jqig3ppp Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iHUEABYIAB0WIQRcEzekXsqa64kGDp7j7w1vZxhRxQUCXlfJTQAKCRDj7w1vZxhR xSoKAQCMi6BKOxFBB0uhTTAvap1MsvS6SQ4ndibeVqk1uZYQrAD/So9dwDrZrPz1 Tqt3wtZE3K5zNiD+3QvSqGsynf+04AM= =64J/ -----END PGP SIGNATURE----- --z6z2joa2jqig3ppp--