diff mbox series

[v3,3/3] spi: dt-bindings: document zero value for spi-{rx,tx}-bus-width properties

Message ID 20201127130834.136348-3-alexandru.ardelean@analog.com (mailing list archive)
State Superseded
Headers show
Series [v3,1/3] spi: uapi: unify SPI modes into a single spi.h header | expand

Commit Message

Alexandru Ardelean Nov. 27, 2020, 1:08 p.m. UTC
Following a change to the SPI framework, providing a value of zero for
'spi-rx-bus-width' and 'spi-tx-bus-width' is now possible and will
essentially mean than no RX or TX is allowed.

Signed-off-by: Alexandru Ardelean <alexandru.ardelean@analog.com>
---
 Documentation/devicetree/bindings/spi/spi-controller.yaml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

Comments

Andy Shevchenko Nov. 27, 2020, 2:26 p.m. UTC | #1
On Fri, Nov 27, 2020 at 3:08 PM Alexandru Ardelean
<alexandru.ardelean@analog.com> wrote:
>
> Following a change to the SPI framework, providing a value of zero for
> 'spi-rx-bus-width' and 'spi-tx-bus-width' is now possible and will
> essentially mean than no RX or TX is allowed.

than -> that

I'm wondering if we have a possibility to strict this for controllers
that always duplex (I assume that schema works in a way that the
generic bindings is most relaxed in comparison to the device specific
ones in case of the same binding in question).
Alexandru Ardelean Dec. 3, 2020, 1:35 p.m. UTC | #2
> -----Original Message-----
> From: Andy Shevchenko <andy.shevchenko@gmail.com>
> Sent: Friday, November 27, 2020 4:26 PM
> To: Ardelean, Alexandru <alexandru.Ardelean@analog.com>
> Cc: linux-spi <linux-spi@vger.kernel.org>; devicetree
> <devicetree@vger.kernel.org>; Linux Kernel Mailing List <linux-
> kernel@vger.kernel.org>; Rob Herring <robh+dt@kernel.org>; Mark Brown
> <broonie@kernel.org>; Bogdan, Dragos <Dragos.Bogdan@analog.com>
> Subject: Re: [PATCH v3 3/3] spi: dt-bindings: document zero value for spi-{rx,tx}-
> bus-width properties
> 
> On Fri, Nov 27, 2020 at 3:08 PM Alexandru Ardelean
> <alexandru.ardelean@analog.com> wrote:
> >
> > Following a change to the SPI framework, providing a value of zero for
> > 'spi-rx-bus-width' and 'spi-tx-bus-width' is now possible and will
> > essentially mean than no RX or TX is allowed.
> 
> than -> that
> 
> I'm wondering if we have a possibility to strict this for controllers that always
> duplex (I assume that schema works in a way that the generic bindings is most
> relaxed in comparison to the device specific ones in case of the same binding in
> question).

No idea here.

> 
> --
> With Best Regards,
> Andy Shevchenko
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/spi/spi-controller.yaml b/Documentation/devicetree/bindings/spi/spi-controller.yaml
index 1b56d5e40f1f..f1aaaf9b3709 100644
--- a/Documentation/devicetree/bindings/spi/spi-controller.yaml
+++ b/Documentation/devicetree/bindings/spi/spi-controller.yaml
@@ -125,8 +125,9 @@  patternProperties:
       spi-rx-bus-width:
         description:
           Bus width to the SPI bus used for read transfers.
+          If 0 is provided, then no RX will be possible on this devices.
         $ref: /schemas/types.yaml#/definitions/uint32
-        enum: [1, 2, 4, 8]
+        enum: [0, 1, 2, 4, 8]
         default: 1
 
       spi-rx-delay-us:
@@ -136,8 +137,9 @@  patternProperties:
       spi-tx-bus-width:
         description:
           Bus width to the SPI bus used for write transfers.
+          If 0 is provided, then no RX will be possible on this devices.
         $ref: /schemas/types.yaml#/definitions/uint32
-        enum: [1, 2, 4, 8]
+        enum: [0, 1, 2, 4, 8]
         default: 1
 
       spi-tx-delay-us: