Commit 80137388 authored by Krzysztof Kozlowski's avatar Krzysztof Kozlowski Committed by Jonathan Cameron
Browse files

dt-bindings: iio: adc: use spi-peripheral-props.yaml



Instead of listing directly properties typical for SPI peripherals,
reference the spi-peripheral-props.yaml schema.  This allows using all
properties typical for SPI-connected devices, even these which device
bindings author did not tried yet.

Remove the spi-* properties which now come via spi-peripheral-props.yaml
schema, except for the cases when device schema adds some constraints
like maximum frequency.

While changing additionalProperties->unevaluatedProperties, put it in
typical place, just before example DTS.

Signed-off-by: default avatarKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: default avatarMarcus Folkesson <marcus.folkesson@gmail.com>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220816124321.67817-2-krzysztof.kozlowski@linaro.org


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 59d1c811
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -52,8 +52,6 @@ properties:
  avdd-supply:
    description: avdd supply can be used as reference for conversion.

  spi-max-frequency: true

required:
  - compatible
  - reg
@@ -106,7 +104,10 @@ patternProperties:

    additionalProperties: false

additionalProperties: false
allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

examples:
  - |
+4 −3
Original line number Diff line number Diff line
@@ -30,8 +30,6 @@ properties:

  spi-cpha: true

  spi-max-frequency: true

  clocks:
    maxItems: 1
    description: phandle to the master clock (mclk)
@@ -94,7 +92,10 @@ required:
  - spi-cpol
  - spi-cpha

additionalProperties: false
allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

examples:
  - |
+4 −3
Original line number Diff line number Diff line
@@ -28,8 +28,6 @@ properties:
    description: IRQ line for the ADC
    maxItems: 1

  spi-max-frequency: true

  adi,voltage-alert-last-chan:
    $ref: /schemas/types.yaml#/definitions/uint32
    description:
@@ -55,7 +53,10 @@ required:
  - compatible
  - reg

additionalProperties: false
allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

examples:
  - |
+4 −3
Original line number Diff line number Diff line
@@ -30,8 +30,6 @@ properties:

  spi-cpha: true

  spi-max-frequency: true

  '#address-cells':
    const: 1

@@ -65,7 +63,10 @@ patternProperties:

    additionalProperties: true

additionalProperties: false
allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

examples:
  - |
+4 −2
Original line number Diff line number Diff line
@@ -24,13 +24,15 @@ properties:

  vref-supply: true
  vdd-supply: true
  spi-max-frequency: true

required:
  - compatible
  - reg

additionalProperties: false
allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#

unevaluatedProperties: false

examples:
  - |
Loading