@@ -112,18 +112,32 @@ properties:
assumed that the pins are hardwired to VDD.
type: boolean
+ parallel-interface:
+ description:
+ If the parallel interface is used, be it directly or through a backend,
+ this property must be defined.
+ type: boolean
+
required:
- compatible
- reg
- - spi-cpol
- avcc-supply
- vdrive-supply
- interrupts
- adi,conversion-start-gpios
-allOf:
- - $ref: /schemas/spi/spi-peripheral-props.yaml#
+oneOf:
+ - required:
+ - parallel-interface
+ - allOf:
+ - properties:
+ parallel-interface: false
+ spi-cpol: true
+ - $ref: /schemas/spi/spi-peripheral-props.yaml#
+ - required:
+ - spi-cpol
+allOf:
- if:
properties:
compatible:
The SPI conditions are not always required, because there is also a parallel interface. The way used to detect that the SPI interface is used is to check if the reg value is between 0 and 256. There is also a correction on the spi-cpha that is not required when SPI interface is selected, while spi-cpol is. Signed-off-by: Guillaume Stols <gstols@baylibre.com> --- .../devicetree/bindings/iio/adc/adi,ad7606.yaml | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-)