Re: [PATCH v2 16/29] dt-bindings:iio:dac:ti,dac082s085 yaml conversion

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

 



On Sat, 31 Oct 2020 17:58:36 +0100
Lukas Wunner <lukas@xxxxxxxxx> wrote:

> On Sat, Oct 31, 2020 at 01:40:57PM +0000, Jonathan Cameron wrote:
> > +  spi-cpha: true
> > +  spi-cpol:
> > +    description:
> > +      Should be either spi-cpha, or spi-cpol but not both.  
> 
> Do the YAML files follow RFC 2119 terminology?  If so, this is a
> "must", not a "should".  (As it was in the txt file.)

I'll fix that whilst applying if it is all we have outstanding.
This is an information comment only as the actual enforcement is
below.


> 
> 
> > +required:
> > +  - compatible
> > +  - reg
> > +  - vref-supply  
> 
> This is missing "spi-cpha xor spi-cpol", not sure if it can be
> specified here using the xor YAML trick.

It has to be specified in a separate block as far as I can tell.
That is done further down the file.  I've tested all the combinations
and xor is enforced.

+allOf:
+  - $ref: '#/definitions/cpolXORcpha'
+
+definitions:
+  cpolXORcpha:
+    not:
+      required: [spi-cpha, spi-cpol]
+    oneOf:
+      - required:
+          - spi-cpha
+      - required:
+          - spi-cpol
+

> 
> Thanks,
> 
> Lukas




[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