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

dt-bindings: iio: dac: 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 avatarRob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220816124321.67817-5-krzysztof.kozlowski@linaro.org


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 1deca207
Loading
Loading
Loading
Loading
+3 −4
Original line number Diff line number Diff line
@@ -95,15 +95,12 @@ properties:
  vrefD-supply: true
  vref-supply: true

  spi-max-frequency: true

additionalProperties: false

required:
  - compatible
  - reg

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#
  - # Shared external vref, no internal reference
    if:
      properties:
@@ -232,6 +229,8 @@ allOf:
        - vrefA-supply
        - vrefB-supply

unevaluatedProperties: false

examples:
  - |
    spi {
+3 −4
Original line number Diff line number Diff line
@@ -28,10 +28,6 @@ properties:
  vref1-supply: true
  vref2-supply: true

  spi-max-frequency: true

additionalProperties: false

required:
  - compatible
  - reg
@@ -39,6 +35,7 @@ required:
  - vref1-supply

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#
  - if:
      properties:
        compatible:
@@ -63,6 +60,8 @@ allOf:
      required:
        - vref2-supply

unevaluatedProperties: false

examples:
  - |
    spi {
+5 −4
Original line number Diff line number Diff line
@@ -39,14 +39,15 @@ properties:
    description:
      If not supplied devices will use internal regulators.

  spi-max-frequency: true

additionalProperties: false

required:
  - compatible
  - reg

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

unevaluatedProperties: false

examples:
  - |
    spi {
+4 −3
Original line number Diff line number Diff line
@@ -26,13 +26,14 @@ properties:
    maxItems: 1
    description: Fault signal.

  spi-max-frequency: true

required:
  - compatible
  - reg

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

unevaluatedProperties: false

examples:
  - |
+3 −4
Original line number Diff line number Diff line
@@ -27,19 +27,16 @@ properties:
  reg:
    maxItems: 1

  spi-max-frequency: true

  VREF-supply: true
  VREFA-supply: true
  VREFB-supply: true

additionalProperties: false

required:
  - compatible
  - reg

allOf:
  - $ref: /schemas/spi/spi-peripheral-props.yaml#
  - if:
      properties:
        compatible:
@@ -72,6 +69,8 @@ allOf:
        - VREFA-supply
        - VREFB-supply

unevaluatedProperties: false

examples:
  - |
    spi {
Loading