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

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.orgSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 80137388
...@@ -27,15 +27,16 @@ properties: ...@@ -27,15 +27,16 @@ properties:
interrupts: interrupts:
maxItems: 1 maxItems: 1
spi-max-frequency: true
vdd-supply: true vdd-supply: true
required: required:
- compatible - compatible
- reg - reg
additionalProperties: false allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples: examples:
- | - |
......
...@@ -25,14 +25,15 @@ properties: ...@@ -25,14 +25,15 @@ properties:
interrupts: interrupts:
maxItems: 1 maxItems: 1
spi-max-frequency: true
required: required:
- compatible - compatible
- reg - reg
- interrupts - interrupts
additionalProperties: false allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples: examples:
- | - |
......
...@@ -24,8 +24,6 @@ properties: ...@@ -24,8 +24,6 @@ properties:
spi-3wire: true spi-3wire: true
spi-max-frequency: true
vs-supply: vs-supply:
description: Regulator that supplies power to the accelerometer description: Regulator that supplies power to the accelerometer
...@@ -48,7 +46,10 @@ required: ...@@ -48,7 +46,10 @@ required:
- compatible - compatible
- reg - reg
additionalProperties: false allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples: examples:
- | - |
......
...@@ -32,8 +32,6 @@ properties: ...@@ -32,8 +32,6 @@ properties:
spi-cpol: true spi-cpol: true
spi-max-frequency: true
interrupts: interrupts:
maxItems: 1 maxItems: 1
...@@ -42,7 +40,10 @@ required: ...@@ -42,7 +40,10 @@ required:
- reg - reg
- interrupts - interrupts
additionalProperties: false allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples: examples:
- | - |
......
...@@ -45,13 +45,14 @@ properties: ...@@ -45,13 +45,14 @@ properties:
vddio-supply: vddio-supply:
description: Regulator that provides power to the bus description: Regulator that provides power to the bus
spi-max-frequency: true
required: required:
- compatible - compatible
- reg - reg
additionalProperties: false allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples: examples:
- | - |
......
...@@ -35,8 +35,6 @@ properties: ...@@ -35,8 +35,6 @@ properties:
interrupts: interrupts:
maxItems: 1 maxItems: 1
spi-max-frequency: true
vdd-supply: true vdd-supply: true
vddio-supply: true vddio-supply: true
...@@ -45,7 +43,10 @@ required: ...@@ -45,7 +43,10 @@ required:
- reg - reg
- interrupts - interrupts
additionalProperties: false allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples: examples:
- | - |
......
...@@ -25,14 +25,15 @@ properties: ...@@ -25,14 +25,15 @@ properties:
interrupts: interrupts:
maxItems: 1 maxItems: 1
spi-max-frequency: true
required: required:
- compatible - compatible
- reg - reg
- interrupts - interrupts
additionalProperties: false allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples: examples:
- | - |
......
...@@ -20,8 +20,6 @@ properties: ...@@ -20,8 +20,6 @@ properties:
interrupts: interrupts:
maxItems: 1 maxItems: 1
spi-max-frequency: true
vdda-supply: true vdda-supply: true
vddd-supply: true vddd-supply: true
vddio-supply: true vddio-supply: true
...@@ -30,7 +28,10 @@ required: ...@@ -30,7 +28,10 @@ required:
- compatible - compatible
- reg - reg
additionalProperties: false allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples: examples:
- | - |
......
...@@ -72,7 +72,10 @@ required: ...@@ -72,7 +72,10 @@ required:
- compatible - compatible
- reg - reg
additionalProperties: false allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples: examples:
- | - |
......
...@@ -24,8 +24,6 @@ properties: ...@@ -24,8 +24,6 @@ properties:
reg: reg:
maxItems: 1 maxItems: 1
spi-max-frequency: true
vdd-supply: true vdd-supply: true
vddio-supply: true vddio-supply: true
...@@ -50,7 +48,10 @@ required: ...@@ -50,7 +48,10 @@ required:
- compatible - compatible
- reg - reg
additionalProperties: false allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples: examples:
- | - |
......
...@@ -39,13 +39,14 @@ properties: ...@@ -39,13 +39,14 @@ properties:
- "INT1" - "INT1"
- "INT2" - "INT2"
spi-max-frequency: true
required: required:
- compatible - compatible
- reg - reg
additionalProperties: false allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples: examples:
- | - |
......
...@@ -29,13 +29,14 @@ properties: ...@@ -29,13 +29,14 @@ properties:
mount-matrix: mount-matrix:
description: an optional 3x3 mounting rotation matrix. description: an optional 3x3 mounting rotation matrix.
spi-max-frequency: true
required: required:
- compatible - compatible
- reg - reg
additionalProperties: false allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples: examples:
- | - |
......
...@@ -29,7 +29,10 @@ required: ...@@ -29,7 +29,10 @@ required:
- compatible - compatible
- reg - reg
additionalProperties: false allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples: examples:
- | - |
......
...@@ -27,8 +27,6 @@ properties: ...@@ -27,8 +27,6 @@ properties:
vdd-supply: vdd-supply:
description: phandle to the regulator that provides power to the accelerometer description: phandle to the regulator that provides power to the accelerometer
spi-max-frequency: true
interrupts: interrupts:
maxItems: 1 maxItems: 1
...@@ -44,7 +42,10 @@ required: ...@@ -44,7 +42,10 @@ required:
- compatible - compatible
- reg - reg
additionalProperties: false allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples: examples:
- | - |
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment