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

dt-bindings: iio: accel: 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-3-krzysztof.kozlowski@linaro.org


Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 80137388
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -27,15 +27,16 @@ properties:
  interrupts:
    maxItems: 1

  spi-max-frequency: true

  vdd-supply: true

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
@@ -25,14 +25,15 @@ properties:
  interrupts:
    maxItems: 1

  spi-max-frequency: true

required:
  - compatible
  - reg
  - interrupts

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

unevaluatedProperties: false

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

  spi-3wire: true

  spi-max-frequency: true

  vs-supply:
    description: Regulator that supplies power to the accelerometer

@@ -48,7 +46,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
@@ -32,8 +32,6 @@ properties:

  spi-cpol: true

  spi-max-frequency: true

  interrupts:
    maxItems: 1

@@ -42,7 +40,10 @@ required:
  - reg
  - interrupts

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

unevaluatedProperties: false

examples:
  - |
+4 −3
Original line number Diff line number Diff line
@@ -45,13 +45,14 @@ properties:
  vddio-supply:
    description: Regulator that provides power to the bus

  spi-max-frequency: true

required:
  - compatible
  - reg

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

unevaluatedProperties: false

examples:
  - |
Loading