Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Reviewed-by: Marcus Folkesson <marcus.folkesson@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20220816124321.67817-2-krzysztof.kozlowski@linaro.org
Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>

authored by

Krzysztof Kozlowski and committed by
Jonathan Cameron
80137388 59d1c811

+131 -93
+4 -3
Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml
··· 52 52 avdd-supply: 53 53 description: avdd supply can be used as reference for conversion. 54 54 55 - spi-max-frequency: true 56 - 57 55 required: 58 56 - compatible 59 57 - reg ··· 104 106 105 107 additionalProperties: false 106 108 107 - additionalProperties: false 109 + allOf: 110 + - $ref: /schemas/spi/spi-peripheral-props.yaml# 111 + 112 + unevaluatedProperties: false 108 113 109 114 examples: 110 115 - |
+4 -3
Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml
··· 30 30 31 31 spi-cpha: true 32 32 33 - spi-max-frequency: true 34 - 35 33 clocks: 36 34 maxItems: 1 37 35 description: phandle to the master clock (mclk) ··· 92 94 - spi-cpol 93 95 - spi-cpha 94 96 95 - additionalProperties: false 97 + allOf: 98 + - $ref: /schemas/spi/spi-peripheral-props.yaml# 99 + 100 + unevaluatedProperties: false 96 101 97 102 examples: 98 103 - |
+4 -3
Documentation/devicetree/bindings/iio/adc/adi,ad7280a.yaml
··· 28 28 description: IRQ line for the ADC 29 29 maxItems: 1 30 30 31 - spi-max-frequency: true 32 - 33 31 adi,voltage-alert-last-chan: 34 32 $ref: /schemas/types.yaml#/definitions/uint32 35 33 description: ··· 53 55 - compatible 54 56 - reg 55 57 56 - additionalProperties: false 58 + allOf: 59 + - $ref: /schemas/spi/spi-peripheral-props.yaml# 60 + 61 + unevaluatedProperties: false 57 62 58 63 examples: 59 64 - |
+4 -3
Documentation/devicetree/bindings/iio/adc/adi,ad7292.yaml
··· 30 30 31 31 spi-cpha: true 32 32 33 - spi-max-frequency: true 34 - 35 33 '#address-cells': 36 34 const: 1 37 35 ··· 63 65 64 66 additionalProperties: true 65 67 66 - additionalProperties: false 68 + allOf: 69 + - $ref: /schemas/spi/spi-peripheral-props.yaml# 70 + 71 + unevaluatedProperties: false 67 72 68 73 examples: 69 74 - |
+4 -2
Documentation/devicetree/bindings/iio/adc/adi,ad7298.yaml
··· 24 24 25 25 vref-supply: true 26 26 vdd-supply: true 27 - spi-max-frequency: true 28 27 29 28 required: 30 29 - compatible 31 30 - reg 32 31 33 - additionalProperties: false 32 + allOf: 33 + - $ref: /schemas/spi/spi-peripheral-props.yaml# 34 + 35 + unevaluatedProperties: false 34 36 35 37 examples: 36 38 - |
+4 -4
Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml
··· 66 66 to the other supplies. Needed to be able to establish channel scaling 67 67 unless there is also an internal reference available (e.g. ad7091r) 68 68 69 - spi-max-frequency: true 70 - 71 69 adi,conversion-start-gpios: 72 70 description: A GPIO used to trigger the start of a conversion 73 71 maxItems: 1 ··· 74 76 - compatible 75 77 - reg 76 78 77 - additionalProperties: false 78 - 79 79 allOf: 80 + - $ref: /schemas/spi/spi-peripheral-props.yaml# 81 + 80 82 # Devices where reference is vcc 81 83 - if: 82 84 properties: ··· 155 157 else: 156 158 properties: 157 159 adi,conversion-start-gpios: false 160 + 161 + unevaluatedProperties: false 158 162 159 163 examples: 160 164 - |
+4 -3
Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml
··· 32 32 33 33 spi-cpol: true 34 34 35 - spi-max-frequency: true 36 - 37 35 avcc-supply: true 38 36 39 37 interrupts: ··· 103 105 - interrupts 104 106 - adi,conversion-start-gpios 105 107 106 - additionalProperties: false 108 + allOf: 109 + - $ref: /schemas/spi/spi-peripheral-props.yaml# 110 + 111 + unevaluatedProperties: false 107 112 108 113 examples: 109 114 - |
+4 -3
Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml
··· 50 50 reset-gpios: 51 51 maxItems: 1 52 52 53 - spi-max-frequency: true 54 - 55 53 spi-cpol: true 56 54 57 55 spi-cpha: true ··· 86 88 - reg 87 89 additionalProperties: false 88 90 89 - additionalProperties: false 91 + allOf: 92 + - $ref: /schemas/spi/spi-peripheral-props.yaml# 93 + 94 + unevaluatedProperties: false 90 95 91 96 examples: 92 97 - |
+4 -3
Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml
··· 42 42 '#size-cells': 43 43 const: 0 44 44 45 - spi-max-frequency: true 46 - 47 45 required: 48 46 - compatible 49 47 - reg 50 48 51 - additionalProperties: false 49 + allOf: 50 + - $ref: /schemas/spi/spi-peripheral-props.yaml# 51 + 52 + unevaluatedProperties: false 52 53 53 54 examples: 54 55 - |
+4 -3
Documentation/devicetree/bindings/iio/adc/adi,ad7949.yaml
··· 49 49 default: 4096000 50 50 51 51 52 - spi-max-frequency: true 53 - 54 52 '#io-channel-cells': 55 53 const: 1 56 54 ··· 62 64 - compatible 63 65 - reg 64 66 65 - additionalProperties: false 67 + allOf: 68 + - $ref: /schemas/spi/spi-peripheral-props.yaml# 69 + 70 + unevaluatedProperties: false 66 71 67 72 examples: 68 73 - |
+4 -3
Documentation/devicetree/bindings/iio/adc/holt,hi8435.yaml
··· 24 24 GPIO used for controlling the reset pin 25 25 maxItems: 1 26 26 27 - spi-max-frequency: true 28 - 29 27 "#io-channel-cells": 30 28 const: 1 31 29 ··· 31 33 - compatible 32 34 - reg 33 35 34 - additionalProperties: false 36 + allOf: 37 + - $ref: /schemas/spi/spi-peripheral-props.yaml# 38 + 39 + unevaluatedProperties: false 35 40 36 41 examples: 37 42 - |
+4 -4
Documentation/devicetree/bindings/iio/adc/lltc,ltc2496.yaml
··· 22 22 reg: 23 23 maxItems: 1 24 24 25 - spi-max-frequency: 26 - description: maximal spi bus frequency supported 27 - 28 25 required: 29 26 - compatible 30 27 - vref-supply 31 28 - reg 32 29 33 - additionalProperties: false 30 + allOf: 31 + - $ref: /schemas/spi/spi-peripheral-props.yaml# 32 + 33 + unevaluatedProperties: false 34 34 35 35 examples: 36 36 - |
+4 -1
Documentation/devicetree/bindings/iio/adc/maxim,max1027.yaml
··· 45 45 - compatible 46 46 - reg 47 47 48 - additionalProperties: false 48 + allOf: 49 + - $ref: /schemas/spi/spi-peripheral-props.yaml# 50 + 51 + unevaluatedProperties: false 49 52 50 53 examples: 51 54 - |
+5 -2
Documentation/devicetree/bindings/iio/adc/maxim,max11100.yaml
··· 26 26 minimum: 100000 27 27 maximum: 4800000 28 28 29 - additionalProperties: false 30 - 31 29 required: 32 30 - compatible 33 31 - reg 34 32 - vref-supply 33 + 34 + allOf: 35 + - $ref: /schemas/spi/spi-peripheral-props.yaml# 36 + 37 + unevaluatedProperties: false 35 38 36 39 examples: 37 40 - |
+14 -12
Documentation/devicetree/bindings/iio/adc/maxim,max1118.yaml
··· 28 28 vref-supply: 29 29 description: External reference, needed to establish input scaling 30 30 31 - if: 32 - properties: 33 - compatible: 34 - contains: 35 - const: maxim,max1118 36 - then: 37 - required: 38 - - vref-supply 39 - else: 40 - properties: 41 - vref-supply: false 31 + allOf: 32 + - $ref: /schemas/spi/spi-peripheral-props.yaml# 33 + - if: 34 + properties: 35 + compatible: 36 + contains: 37 + const: maxim,max1118 38 + then: 39 + required: 40 + - vref-supply 41 + else: 42 + properties: 43 + vref-supply: false 42 44 43 45 required: 44 46 - compatible 45 47 - reg 46 48 47 - additionalProperties: false 49 + unevaluatedProperties: false 48 50 49 51 examples: 50 52 - |
+4 -3
Documentation/devicetree/bindings/iio/adc/maxim,max1241.yaml
··· 39 39 thus enabling power-down mode. 40 40 maxItems: 1 41 41 42 - spi-max-frequency: true 43 - 44 42 required: 45 43 - compatible 46 44 - reg 47 45 - vdd-supply 48 46 - vref-supply 49 47 50 - additionalProperties: false 48 + allOf: 49 + - $ref: /schemas/spi/spi-peripheral-props.yaml# 50 + 51 + unevaluatedProperties: false 51 52 52 53 examples: 53 54 - |
+4 -2
Documentation/devicetree/bindings/iio/adc/microchip,mcp3201.yaml
··· 32 32 reg: 33 33 maxItems: 1 34 34 35 - spi-max-frequency: true 36 35 spi-cpha: true 37 36 spi-cpol: true 38 37 ··· 50 51 - reg 51 52 - vref-supply 52 53 53 - additionalProperties: false 54 + allOf: 55 + - $ref: /schemas/spi/spi-peripheral-props.yaml# 56 + 57 + unevaluatedProperties: false 54 58 55 59 examples: 56 60 - |
+4 -1
Documentation/devicetree/bindings/iio/adc/microchip,mcp3911.yaml
··· 51 51 - compatible 52 52 - reg 53 53 54 - additionalProperties: false 54 + allOf: 55 + - $ref: /schemas/spi/spi-peripheral-props.yaml# 56 + 57 + unevaluatedProperties: false 55 58 56 59 examples: 57 60 - |
+4 -3
Documentation/devicetree/bindings/iio/adc/ti,adc0832.yaml
··· 24 24 reg: 25 25 maxItems: 1 26 26 27 - spi-max-frequency: true 28 - 29 27 vref-supply: 30 28 description: External reference, needed to establish input scaling 31 29 ··· 35 37 - reg 36 38 - vref-supply 37 39 38 - additionalProperties: false 40 + allOf: 41 + - $ref: /schemas/spi/spi-peripheral-props.yaml# 42 + 43 + unevaluatedProperties: false 39 44 40 45 examples: 41 46 - |
+4 -3
Documentation/devicetree/bindings/iio/adc/ti,adc084s021.yaml
··· 19 19 reg: 20 20 maxItems: 1 21 21 22 - spi-max-frequency: true 23 - 24 22 vref-supply: 25 23 description: External reference, needed to establish input scaling 26 24 ··· 35 37 - spi-cpol 36 38 - spi-cpha 37 39 38 - additionalProperties: false 40 + allOf: 41 + - $ref: /schemas/spi/spi-peripheral-props.yaml# 42 + 43 + unevaluatedProperties: false 39 44 40 45 examples: 41 46 - |
+4 -2
Documentation/devicetree/bindings/iio/adc/ti,adc108s102.yaml
··· 19 19 20 20 reg: true 21 21 vref-supply: true 22 - spi-max-frequency: true 23 22 "#io-channel-cells": 24 23 const: 1 25 24 ··· 27 28 - reg 28 29 - vref-supply 29 30 30 - additionalProperties: false 31 + allOf: 32 + - $ref: /schemas/spi/spi-peripheral-props.yaml# 33 + 34 + unevaluatedProperties: false 31 35 32 36 examples: 33 37 - |
+4 -3
Documentation/devicetree/bindings/iio/adc/ti,adc12138.yaml
··· 31 31 maxItems: 1 32 32 description: Conversion clock input. 33 33 34 - spi-max-frequency: true 35 - 36 34 vref-p-supply: 37 35 description: The regulator supply for positive analog voltage reference 38 36 ··· 60 62 - clocks 61 63 - vref-p-supply 62 64 63 - additionalProperties: false 65 + allOf: 66 + - $ref: /schemas/spi/spi-peripheral-props.yaml# 67 + 68 + unevaluatedProperties: false 64 69 65 70 examples: 66 71 - |
+4 -3
Documentation/devicetree/bindings/iio/adc/ti,adc128s052.yaml
··· 27 27 reg: 28 28 maxItems: 1 29 29 30 - spi-max-frequency: true 31 - 32 30 vref-supply: true 33 31 34 32 "#io-channel-cells": ··· 37 39 - reg 38 40 - vref-supply 39 41 40 - additionalProperties: false 42 + allOf: 43 + - $ref: /schemas/spi/spi-peripheral-props.yaml# 44 + 45 + unevaluatedProperties: false 41 46 42 47 examples: 43 48 - |
+4 -3
Documentation/devicetree/bindings/iio/adc/ti,adc161s626.yaml
··· 21 21 reg: 22 22 maxItems: 1 23 23 24 - spi-max-frequency: true 25 - 26 24 vdda-supply: true 27 25 28 26 "#io-channel-cells": ··· 30 32 - compatible 31 33 - reg 32 34 33 - additionalProperties: false 35 + allOf: 36 + - $ref: /schemas/spi/spi-peripheral-props.yaml# 37 + 38 + unevaluatedProperties: false 34 39 35 40 examples: 36 41 - |
+4 -3
Documentation/devicetree/bindings/iio/adc/ti,ads124s08.yaml
··· 18 18 reg: 19 19 maxItems: 1 20 20 21 - spi-max-frequency: true 22 - 23 21 spi-cpha: true 24 22 25 23 reset-gpios: ··· 30 32 - compatible 31 33 - reg 32 34 33 - additionalProperties: false 35 + allOf: 36 + - $ref: /schemas/spi/spi-peripheral-props.yaml# 37 + 38 + unevaluatedProperties: false 34 39 35 40 examples: 36 41 - |
+4 -3
Documentation/devicetree/bindings/iio/adc/ti,ads131e08.yaml
··· 28 28 reg: 29 29 maxItems: 1 30 30 31 - spi-max-frequency: true 32 - 33 31 spi-cpha: true 34 32 35 33 clocks: ··· 118 120 119 121 additionalProperties: false 120 122 121 - additionalProperties: false 123 + allOf: 124 + - $ref: /schemas/spi/spi-peripheral-props.yaml# 125 + 126 + unevaluatedProperties: false 122 127 123 128 examples: 124 129 - |
+4 -3
Documentation/devicetree/bindings/iio/adc/ti,ads8344.yaml
··· 19 19 reg: 20 20 maxItems: 1 21 21 22 - spi-max-frequency: true 23 - 24 22 vref-supply: 25 23 description: Supply the 2.5V or 5V reference voltage 26 24 ··· 30 32 - reg 31 33 - vref-supply 32 34 33 - additionalProperties: false 35 + allOf: 36 + - $ref: /schemas/spi/spi-peripheral-props.yaml# 37 + 38 + unevaluatedProperties: false 34 39 35 40 examples: 36 41 - |
+4 -3
Documentation/devicetree/bindings/iio/adc/ti,ads8688.yaml
··· 25 25 description: Optional external reference. If not supplied, assume 26 26 REFSEL input tied low to enable the internal reference. 27 27 28 - spi-max-frequency: true 29 - 30 28 required: 31 29 - compatible 32 30 - reg 33 31 34 - additionalProperties: false 32 + allOf: 33 + - $ref: /schemas/spi/spi-peripheral-props.yaml# 34 + 35 + unevaluatedProperties: false 35 36 36 37 examples: 37 38 - |
+4 -3
Documentation/devicetree/bindings/iio/adc/ti,tlc4541.yaml
··· 21 21 reg: 22 22 maxItems: 1 23 23 24 - spi-max-frequency: true 25 - 26 24 vref-supply: true 27 25 28 26 "#io-channel-cells": ··· 31 33 - reg 32 34 - vref-supply 33 35 34 - additionalProperties: false 36 + allOf: 37 + - $ref: /schemas/spi/spi-peripheral-props.yaml# 38 + 39 + unevaluatedProperties: false 35 40 36 41 examples: 37 42 - |
+4 -3
Documentation/devicetree/bindings/iio/adc/ti,tsc2046.yaml
··· 23 23 interrupts: 24 24 maxItems: 1 25 25 26 - spi-max-frequency: true 27 - 28 26 "#io-channel-cells": 29 27 const: 1 30 28 ··· 57 59 58 60 additionalProperties: false 59 61 60 - additionalProperties: false 62 + allOf: 63 + - $ref: /schemas/spi/spi-peripheral-props.yaml# 64 + 65 + unevaluatedProperties: false 61 66 62 67 examples: 63 68 - |