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:
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:
- |
......
......@@ -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:
- |
......
......@@ -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:
- |
......
......@@ -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:
- |
......
......@@ -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:
- |
......
......@@ -35,8 +35,6 @@ properties:
interrupts:
maxItems: 1
spi-max-frequency: true
vdd-supply: true
vddio-supply: true
......@@ -45,7 +43,10 @@ required:
- reg
- interrupts
additionalProperties: false
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples:
- |
......
......@@ -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:
- |
......
......@@ -20,8 +20,6 @@ properties:
interrupts:
maxItems: 1
spi-max-frequency: true
vdda-supply: true
vddd-supply: true
vddio-supply: true
......@@ -30,7 +28,10 @@ required:
- compatible
- reg
additionalProperties: false
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples:
- |
......
......@@ -72,7 +72,10 @@ required:
- compatible
- reg
additionalProperties: false
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples:
- |
......
......@@ -24,8 +24,6 @@ properties:
reg:
maxItems: 1
spi-max-frequency: true
vdd-supply: true
vddio-supply: true
......@@ -50,7 +48,10 @@ required:
- compatible
- reg
additionalProperties: false
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples:
- |
......
......@@ -39,13 +39,14 @@ properties:
- "INT1"
- "INT2"
spi-max-frequency: true
required:
- compatible
- reg
additionalProperties: false
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples:
- |
......
......@@ -29,13 +29,14 @@ properties:
mount-matrix:
description: an optional 3x3 mounting rotation matrix.
spi-max-frequency: true
required:
- compatible
- reg
additionalProperties: false
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples:
- |
......
......@@ -29,7 +29,10 @@ required:
- compatible
- reg
additionalProperties: false
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
examples:
- |
......
......@@ -27,8 +27,6 @@ properties:
vdd-supply:
description: phandle to the regulator that provides power to the accelerometer
spi-max-frequency: true
interrupts:
maxItems: 1
......@@ -44,7 +42,10 @@ required:
- compatible
- reg
additionalProperties: false
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
unevaluatedProperties: false
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