All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 00/10] dt-bindings: iio: use spi-peripheral-props.yaml
@ 2022-07-27 16:46 Krzysztof Kozlowski
  2022-07-27 16:46 ` [PATCH v2 01/10] dt-bindings: iio: adc: " Krzysztof Kozlowski
                   ` (10 more replies)
  0 siblings, 11 replies; 22+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-27 16:46 UTC (permalink / raw)
  To: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Rob Herring, Krzysztof Kozlowski, Lucas Stankus, Puranjay Mohan,
	Cosmin Tanislav, Alexandru Tachici, Marcelo Schmitt,
	Marcus Folkesson, Kent Gustavsson, Tomislav Denis,
	Oleksij Rempel, kernel, Antoniu Miclaus, Ricardo Ribalda,
	Dragos Bogdan, Jean-Baptiste Maneyrol, Lorenzo Bianconi,
	Stefan Popa, Linus Walleij, Stephan Gerhold, Mike Looijmans,
	Joachim Eastwood, Tomas Melin, Sean Nyekjaer, Beniamin Bia,
	Patrick Vasseur, Charles-Antoine Couret, Vladimir Barinov,
	Miquel Raynal, Philippe Reynes, Jacopo Mondi, Akinobu Mita,
	Alexandru Lazar, Oskar Andero, Mårten Lindahl,
	Bogdan Pricop, Angelo Compagnucci, Matt Ranostay, Dan Murphy,
	Gregory Clement, Phil Reid, Michael Welling, Lukas Wunner,
	Robert Jones, Chris Coffey, Slawomir Stepien, Sankar Velliangiri,
	linux-iio, devicetree, linux-kernel, linux-fbdev
  Cc: Krzysztof Kozlowski

Technically, this depends on [1] merged to SPI tree, if we want to
preserve existing behavior of not allowing SPI CPHA and CPOL in each of
schemas in this patch.

If this patch comes independently via different tree, the SPI CPHA and
CPOL will be allowed for brief period of time, before [1] is merged.
This will not have negative impact, just DT schema checks will be
loosened for that period.

[1] https://lore.kernel.org/all/20220722191539.90641-2-krzysztof.kozlowski@linaro.org/

Changes since v1
================
1. Continue the rework for entire IIO.
v1: https://lore.kernel.org/all/20220715095302.214276-1-krzysztof.kozlowski@linaro.org/

Best regards,
Krzysztof

Krzysztof Kozlowski (10):
  dt-bindings: iio: adc: use spi-peripheral-props.yaml
  dt-bindings: iio: accel: use spi-peripheral-props.yaml
  dt-bindings: iio: amplifiers: adi,ada4250: use
    spi-peripheral-props.yaml
  dt-bindings: iio: dac: use spi-peripheral-props.yaml
  dt-bindings: iio: frequency: adf4371: use spi-peripheral-props.yaml
  dt-bindings: iio: health: ti,afe4403: use spi-peripheral-props.yaml
  dt-bindings: iio: imu: use spi-peripheral-props.yaml
  dt-bindings: iio: potentiometer: use spi-peripheral-props.yaml
  dt-bindings: iio: samsung,sensorhub-rinato: use
    spi-peripheral-props.yaml
  dt-bindings: iio: temperature: use spi-peripheral-props.yaml

 .../bindings/iio/accel/adi,adis16201.yaml     |  7 ++---
 .../bindings/iio/accel/adi,adis16240.yaml     |  7 ++---
 .../bindings/iio/accel/adi,adxl313.yaml       |  9 +++----
 .../bindings/iio/accel/adi,adxl345.yaml       |  7 ++---
 .../bindings/iio/accel/adi,adxl355.yaml       |  7 ++---
 .../bindings/iio/accel/adi,adxl367.yaml       |  7 ++---
 .../bindings/iio/accel/adi,adxl372.yaml       |  7 ++---
 .../bindings/iio/accel/bosch,bma220.yaml      |  7 ++---
 .../bindings/iio/accel/bosch,bma255.yaml      |  5 +++-
 .../bindings/iio/accel/bosch,bmi088.yaml      |  7 ++---
 .../bindings/iio/accel/fsl,mma7455.yaml       |  7 ++---
 .../bindings/iio/accel/kionix,kxsd9.yaml      |  7 ++---
 .../bindings/iio/accel/murata,sca3300.yaml    |  5 +++-
 .../bindings/iio/accel/nxp,fxls8962af.yaml    |  7 ++---
 .../bindings/iio/adc/adi,ad7124.yaml          |  7 ++---
 .../bindings/iio/adc/adi,ad7192.yaml          |  7 ++---
 .../bindings/iio/adc/adi,ad7280a.yaml         |  7 ++---
 .../bindings/iio/adc/adi,ad7292.yaml          |  7 ++---
 .../bindings/iio/adc/adi,ad7298.yaml          |  6 +++--
 .../bindings/iio/adc/adi,ad7476.yaml          |  8 +++---
 .../bindings/iio/adc/adi,ad7606.yaml          |  7 ++---
 .../bindings/iio/adc/adi,ad7768-1.yaml        |  7 ++---
 .../bindings/iio/adc/adi,ad7923.yaml          |  7 ++---
 .../bindings/iio/adc/adi,ad7949.yaml          |  7 ++---
 .../bindings/iio/adc/holt,hi8435.yaml         |  7 ++---
 .../bindings/iio/adc/lltc,ltc2496.yaml        |  8 +++---
 .../bindings/iio/adc/maxim,max1027.yaml       |  5 +++-
 .../bindings/iio/adc/maxim,max11100.yaml      |  7 +++--
 .../bindings/iio/adc/maxim,max1118.yaml       | 26 ++++++++++---------
 .../bindings/iio/adc/maxim,max1241.yaml       |  7 ++---
 .../bindings/iio/adc/microchip,mcp3201.yaml   |  6 +++--
 .../bindings/iio/adc/microchip,mcp3911.yaml   |  5 +++-
 .../bindings/iio/adc/ti,adc0832.yaml          |  7 ++---
 .../bindings/iio/adc/ti,adc084s021.yaml       |  7 ++---
 .../bindings/iio/adc/ti,adc108s102.yaml       |  6 +++--
 .../bindings/iio/adc/ti,adc12138.yaml         |  7 ++---
 .../bindings/iio/adc/ti,adc128s052.yaml       |  7 ++---
 .../bindings/iio/adc/ti,adc161s626.yaml       |  7 ++---
 .../bindings/iio/adc/ti,ads124s08.yaml        |  7 ++---
 .../bindings/iio/adc/ti,ads131e08.yaml        |  7 ++---
 .../bindings/iio/adc/ti,ads8344.yaml          |  7 ++---
 .../bindings/iio/adc/ti,ads8688.yaml          |  7 ++---
 .../bindings/iio/adc/ti,tlc4541.yaml          |  7 ++---
 .../bindings/iio/adc/ti,tsc2046.yaml          |  7 ++---
 .../bindings/iio/amplifiers/adi,ada4250.yaml  |  7 ++---
 .../bindings/iio/dac/adi,ad5064.yaml          |  7 +++--
 .../bindings/iio/dac/adi,ad5360.yaml          |  7 +++--
 .../bindings/iio/dac/adi,ad5380.yaml          |  9 ++++---
 .../bindings/iio/dac/adi,ad5421.yaml          |  7 ++---
 .../bindings/iio/dac/adi,ad5449.yaml          |  7 +++--
 .../bindings/iio/dac/adi,ad5624r.yaml         |  9 ++++---
 .../bindings/iio/dac/adi,ad5686.yaml          |  9 ++++---
 .../bindings/iio/dac/adi,ad5755.yaml          |  9 ++++---
 .../bindings/iio/dac/adi,ad5758.yaml          |  4 +--
 .../bindings/iio/dac/adi,ad5761.yaml          |  7 +++--
 .../bindings/iio/dac/adi,ad5764.yaml          |  7 +++--
 .../bindings/iio/dac/adi,ad5770r.yaml         |  7 ++---
 .../bindings/iio/dac/adi,ad5791.yaml          |  9 ++++---
 .../bindings/iio/dac/adi,ad8801.yaml          |  7 +++--
 .../bindings/iio/dac/microchip,mcp4922.yaml   |  9 ++++---
 .../bindings/iio/dac/ti,dac082s085.yaml       |  9 ++++---
 .../bindings/iio/dac/ti,dac7311.yaml          |  7 ++---
 .../bindings/iio/dac/ti,dac7612.yaml          |  7 ++---
 .../bindings/iio/frequency/adf4371.yaml       |  7 ++---
 .../bindings/iio/health/ti,afe4403.yaml       |  9 ++++---
 .../bindings/iio/imu/adi,adis16460.yaml       |  7 ++---
 .../bindings/iio/imu/adi,adis16480.yaml       |  9 ++++---
 .../bindings/iio/imu/bosch,bmi160.yaml        |  7 ++---
 .../bindings/iio/imu/invensense,icm42600.yaml |  6 +++--
 .../bindings/iio/imu/invensense,mpu6050.yaml  |  5 ++--
 .../bindings/iio/imu/nxp,fxos8700.yaml        |  7 ++---
 .../bindings/iio/imu/st,lsm6dsx.yaml          |  9 ++++---
 .../iio/potentiometer/microchip,mcp41010.yaml |  9 ++++---
 .../iio/potentiometer/microchip,mcp4131.yaml  |  9 ++++---
 .../iio/samsung,sensorhub-rinato.yaml         |  9 ++++---
 .../iio/temperature/maxim,max31855k.yaml      |  4 +--
 .../iio/temperature/maxim,max31856.yaml       |  6 +++--
 .../iio/temperature/maxim,max31865.yaml       |  6 +++--
 78 files changed, 324 insertions(+), 249 deletions(-)

-- 
2.34.1


^ permalink raw reply	[flat|nested] 22+ messages in thread

* [PATCH v2 01/10] dt-bindings: iio: adc: use spi-peripheral-props.yaml
  2022-07-27 16:46 [PATCH v2 00/10] dt-bindings: iio: use spi-peripheral-props.yaml Krzysztof Kozlowski
@ 2022-07-27 16:46 ` Krzysztof Kozlowski
  2022-07-27 16:56   ` Marcus Folkesson
  2022-07-27 16:46 ` [PATCH v2 02/10] dt-bindings: iio: accel: " Krzysztof Kozlowski
                   ` (9 subsequent siblings)
  10 siblings, 1 reply; 22+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-27 16:46 UTC (permalink / raw)
  To: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Rob Herring, Krzysztof Kozlowski, Lucas Stankus, Puranjay Mohan,
	Cosmin Tanislav, Alexandru Tachici, Marcelo Schmitt,
	Marcus Folkesson, Kent Gustavsson, Tomislav Denis,
	Oleksij Rempel, kernel, Antoniu Miclaus, Ricardo Ribalda,
	Dragos Bogdan, Jean-Baptiste Maneyrol, Lorenzo Bianconi,
	Stefan Popa, Linus Walleij, Stephan Gerhold, Mike Looijmans,
	Joachim Eastwood, Tomas Melin, Sean Nyekjaer, Beniamin Bia,
	Patrick Vasseur, Charles-Antoine Couret, Vladimir Barinov,
	Miquel Raynal, Philippe Reynes, Jacopo Mondi, Akinobu Mita,
	Alexandru Lazar, Oskar Andero, Mårten Lindahl,
	Bogdan Pricop, Angelo Compagnucci, Matt Ranostay, Dan Murphy,
	Gregory Clement, Phil Reid, Michael Welling, Lukas Wunner,
	Robert Jones, Chris Coffey, Slawomir Stepien, Sankar Velliangiri,
	linux-iio, devicetree, linux-kernel, linux-fbdev
  Cc: Krzysztof Kozlowski

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>
---
 .../bindings/iio/adc/adi,ad7124.yaml          |  7 ++---
 .../bindings/iio/adc/adi,ad7192.yaml          |  7 ++---
 .../bindings/iio/adc/adi,ad7280a.yaml         |  7 ++---
 .../bindings/iio/adc/adi,ad7292.yaml          |  7 ++---
 .../bindings/iio/adc/adi,ad7298.yaml          |  6 +++--
 .../bindings/iio/adc/adi,ad7476.yaml          |  8 +++---
 .../bindings/iio/adc/adi,ad7606.yaml          |  7 ++---
 .../bindings/iio/adc/adi,ad7768-1.yaml        |  7 ++---
 .../bindings/iio/adc/adi,ad7923.yaml          |  7 ++---
 .../bindings/iio/adc/adi,ad7949.yaml          |  7 ++---
 .../bindings/iio/adc/holt,hi8435.yaml         |  7 ++---
 .../bindings/iio/adc/lltc,ltc2496.yaml        |  8 +++---
 .../bindings/iio/adc/maxim,max1027.yaml       |  5 +++-
 .../bindings/iio/adc/maxim,max11100.yaml      |  7 +++--
 .../bindings/iio/adc/maxim,max1118.yaml       | 26 ++++++++++---------
 .../bindings/iio/adc/maxim,max1241.yaml       |  7 ++---
 .../bindings/iio/adc/microchip,mcp3201.yaml   |  6 +++--
 .../bindings/iio/adc/microchip,mcp3911.yaml   |  5 +++-
 .../bindings/iio/adc/ti,adc0832.yaml          |  7 ++---
 .../bindings/iio/adc/ti,adc084s021.yaml       |  7 ++---
 .../bindings/iio/adc/ti,adc108s102.yaml       |  6 +++--
 .../bindings/iio/adc/ti,adc12138.yaml         |  7 ++---
 .../bindings/iio/adc/ti,adc128s052.yaml       |  7 ++---
 .../bindings/iio/adc/ti,adc161s626.yaml       |  7 ++---
 .../bindings/iio/adc/ti,ads124s08.yaml        |  7 ++---
 .../bindings/iio/adc/ti,ads131e08.yaml        |  7 ++---
 .../bindings/iio/adc/ti,ads8344.yaml          |  7 ++---
 .../bindings/iio/adc/ti,ads8688.yaml          |  7 ++---
 .../bindings/iio/adc/ti,tlc4541.yaml          |  7 ++---
 .../bindings/iio/adc/ti,tsc2046.yaml          |  7 ++---
 30 files changed, 131 insertions(+), 93 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml
index fb3d0dae9bae..75a7184a4735 100644
--- a/Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7124.yaml
@@ -52,8 +52,6 @@ properties:
   avdd-supply:
     description: avdd supply can be used as reference for conversion.
 
-  spi-max-frequency: true
-
 required:
   - compatible
   - reg
@@ -106,7 +104,10 @@ patternProperties:
 
     additionalProperties: false
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml
index 22b7ed3723f6..cc347dade4ef 100644
--- a/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7192.yaml
@@ -30,8 +30,6 @@ properties:
 
   spi-cpha: true
 
-  spi-max-frequency: true
-
   clocks:
     maxItems: 1
     description: phandle to the master clock (mclk)
@@ -94,7 +92,10 @@ required:
   - spi-cpol
   - spi-cpha
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7280a.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7280a.yaml
index a694d5794d4a..dfb8f305e2f0 100644
--- a/Documentation/devicetree/bindings/iio/adc/adi,ad7280a.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7280a.yaml
@@ -28,8 +28,6 @@ properties:
     description: IRQ line for the ADC
     maxItems: 1
 
-  spi-max-frequency: true
-
   adi,voltage-alert-last-chan:
     $ref: /schemas/types.yaml#/definitions/uint32
     description:
@@ -55,7 +53,10 @@ required:
   - compatible
   - reg
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7292.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7292.yaml
index a3e39a40c9b3..1bfbeed6f299 100644
--- a/Documentation/devicetree/bindings/iio/adc/adi,ad7292.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7292.yaml
@@ -30,8 +30,6 @@ properties:
 
   spi-cpha: true
 
-  spi-max-frequency: true
-
   '#address-cells':
     const: 1
 
@@ -65,7 +63,10 @@ patternProperties:
 
     additionalProperties: true
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7298.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7298.yaml
index ca414bb396c5..cd8ac5162d27 100644
--- a/Documentation/devicetree/bindings/iio/adc/adi,ad7298.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7298.yaml
@@ -24,13 +24,15 @@ properties:
 
   vref-supply: true
   vdd-supply: true
-  spi-max-frequency: true
 
 required:
   - compatible
   - reg
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml
index 666414a9c0de..44c671eeda73 100644
--- a/Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7476.yaml
@@ -66,8 +66,6 @@ properties:
       to the other supplies. Needed to be able to establish channel scaling
       unless there is also an internal reference available (e.g. ad7091r)
 
-  spi-max-frequency: true
-
   adi,conversion-start-gpios:
     description: A GPIO used to trigger the start of a conversion
     maxItems: 1
@@ -76,9 +74,9 @@ required:
   - compatible
   - reg
 
-additionalProperties: false
-
 allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
   # Devices where reference is vcc
   - if:
       properties:
@@ -158,6 +156,8 @@ allOf:
       properties:
         adi,conversion-start-gpios: false
 
+unevaluatedProperties: false
+
 examples:
   - |
     spi {
diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml
index 73775174cf57..7c734b2f7e43 100644
--- a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml
@@ -33,8 +33,6 @@ properties:
 
   spi-cpol: true
 
-  spi-max-frequency: true
-
   avcc-supply: true
 
   interrupts:
@@ -106,7 +104,10 @@ required:
   - interrupts
   - adi,conversion-start-gpios
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml
index a85a28145ef6..3ce59d4d065f 100644
--- a/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7768-1.yaml
@@ -50,8 +50,6 @@ properties:
   reset-gpios:
     maxItems: 1
 
-  spi-max-frequency: true
-
   spi-cpol: true
 
   spi-cpha: true
@@ -88,7 +86,10 @@ patternProperties:
       - reg
     additionalProperties: false
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml
index e82194974eea..24a810c23197 100644
--- a/Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7923.yaml
@@ -43,13 +43,14 @@ properties:
   '#size-cells':
     const: 0
 
-  spi-max-frequency: true
-
 required:
   - compatible
   - reg
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7949.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7949.yaml
index 0b10ed5f74ae..9ee4d977c5ed 100644
--- a/Documentation/devicetree/bindings/iio/adc/adi,ad7949.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7949.yaml
@@ -49,8 +49,6 @@ properties:
     default: 4096000
 
 
-  spi-max-frequency: true
-
   '#io-channel-cells':
     const: 1
 
@@ -64,7 +62,10 @@ required:
   - compatible
   - reg
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/adc/holt,hi8435.yaml b/Documentation/devicetree/bindings/iio/adc/holt,hi8435.yaml
index 52490cbb0af0..56bcbe5dcd79 100644
--- a/Documentation/devicetree/bindings/iio/adc/holt,hi8435.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/holt,hi8435.yaml
@@ -24,8 +24,6 @@ properties:
       GPIO used for controlling the reset pin
     maxItems: 1
 
-  spi-max-frequency: true
-
   "#io-channel-cells":
     const: 1
 
@@ -33,7 +31,10 @@ required:
   - compatible
   - reg
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/adc/lltc,ltc2496.yaml b/Documentation/devicetree/bindings/iio/adc/lltc,ltc2496.yaml
index 0bd2fc0356c8..5207c919abe0 100644
--- a/Documentation/devicetree/bindings/iio/adc/lltc,ltc2496.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/lltc,ltc2496.yaml
@@ -22,15 +22,15 @@ properties:
   reg:
     maxItems: 1
 
-  spi-max-frequency:
-    description: maximal spi bus frequency supported
-
 required:
   - compatible
   - vref-supply
   - reg
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/adc/maxim,max1027.yaml b/Documentation/devicetree/bindings/iio/adc/maxim,max1027.yaml
index 46b7747076b9..d0a7ed26d9ea 100644
--- a/Documentation/devicetree/bindings/iio/adc/maxim,max1027.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/maxim,max1027.yaml
@@ -45,7 +45,10 @@ required:
   - compatible
   - reg
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/adc/maxim,max11100.yaml b/Documentation/devicetree/bindings/iio/adc/maxim,max11100.yaml
index 0cf87556ef82..4f74cb33383a 100644
--- a/Documentation/devicetree/bindings/iio/adc/maxim,max11100.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/maxim,max11100.yaml
@@ -26,13 +26,16 @@ properties:
     minimum: 100000
     maximum: 4800000
 
-additionalProperties: false
-
 required:
   - compatible
   - reg
   - vref-supply
 
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
+
 examples:
   - |
     spi {
diff --git a/Documentation/devicetree/bindings/iio/adc/maxim,max1118.yaml b/Documentation/devicetree/bindings/iio/adc/maxim,max1118.yaml
index e948b3e37b0c..bb336e33ebe2 100644
--- a/Documentation/devicetree/bindings/iio/adc/maxim,max1118.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/maxim,max1118.yaml
@@ -28,23 +28,25 @@ properties:
   vref-supply:
     description: External reference, needed to establish input scaling
 
-if:
-  properties:
-    compatible:
-      contains:
-        const: maxim,max1118
-then:
-  required:
-    - vref-supply
-else:
-  properties:
-    vref-supply: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: maxim,max1118
+    then:
+      required:
+        - vref-supply
+    else:
+      properties:
+        vref-supply: false
 
 required:
   - compatible
   - reg
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/adc/maxim,max1241.yaml b/Documentation/devicetree/bindings/iio/adc/maxim,max1241.yaml
index 4c7e0d94bff1..58b12fe8070c 100644
--- a/Documentation/devicetree/bindings/iio/adc/maxim,max1241.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/maxim,max1241.yaml
@@ -39,15 +39,16 @@ properties:
       thus enabling power-down mode.
     maxItems: 1
 
-  spi-max-frequency: true
-
 required:
   - compatible
   - reg
   - vdd-supply
   - vref-supply
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/adc/microchip,mcp3201.yaml b/Documentation/devicetree/bindings/iio/adc/microchip,mcp3201.yaml
index fcc1ba53b20d..18108f0f3731 100644
--- a/Documentation/devicetree/bindings/iio/adc/microchip,mcp3201.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/microchip,mcp3201.yaml
@@ -32,7 +32,6 @@ properties:
   reg:
     maxItems: 1
 
-  spi-max-frequency: true
   spi-cpha: true
   spi-cpol: true
 
@@ -51,7 +50,10 @@ required:
   - reg
   - vref-supply
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/adc/microchip,mcp3911.yaml b/Documentation/devicetree/bindings/iio/adc/microchip,mcp3911.yaml
index 95ab285f4eba..067a7bbadab8 100644
--- a/Documentation/devicetree/bindings/iio/adc/microchip,mcp3911.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/microchip,mcp3911.yaml
@@ -51,7 +51,10 @@ required:
   - compatible
   - reg
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/adc/ti,adc0832.yaml b/Documentation/devicetree/bindings/iio/adc/ti,adc0832.yaml
index f5a923cc847f..686721176a58 100644
--- a/Documentation/devicetree/bindings/iio/adc/ti,adc0832.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/ti,adc0832.yaml
@@ -24,8 +24,6 @@ properties:
   reg:
     maxItems: 1
 
-  spi-max-frequency: true
-
   vref-supply:
     description: External reference, needed to establish input scaling
 
@@ -37,7 +35,10 @@ required:
   - reg
   - vref-supply
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/adc/ti,adc084s021.yaml b/Documentation/devicetree/bindings/iio/adc/ti,adc084s021.yaml
index 1a113b30a414..726d2cbfa368 100644
--- a/Documentation/devicetree/bindings/iio/adc/ti,adc084s021.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/ti,adc084s021.yaml
@@ -19,8 +19,6 @@ properties:
   reg:
     maxItems: 1
 
-  spi-max-frequency: true
-
   vref-supply:
     description: External reference, needed to establish input scaling
 
@@ -37,7 +35,10 @@ required:
   - spi-cpol
   - spi-cpha
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/adc/ti,adc108s102.yaml b/Documentation/devicetree/bindings/iio/adc/ti,adc108s102.yaml
index 54955f03df93..1a589ad1659f 100644
--- a/Documentation/devicetree/bindings/iio/adc/ti,adc108s102.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/ti,adc108s102.yaml
@@ -19,7 +19,6 @@ properties:
 
   reg: true
   vref-supply: true
-  spi-max-frequency: true
   "#io-channel-cells":
     const: 1
 
@@ -28,7 +27,10 @@ required:
   - reg
   - vref-supply
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/adc/ti,adc12138.yaml b/Documentation/devicetree/bindings/iio/adc/ti,adc12138.yaml
index ec3b2edf1fb7..076088a328c3 100644
--- a/Documentation/devicetree/bindings/iio/adc/ti,adc12138.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/ti,adc12138.yaml
@@ -31,8 +31,6 @@ properties:
     maxItems: 1
     description: Conversion clock input.
 
-  spi-max-frequency: true
-
   vref-p-supply:
     description: The regulator supply for positive analog voltage reference
 
@@ -62,7 +60,10 @@ required:
   - clocks
   - vref-p-supply
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/adc/ti,adc128s052.yaml b/Documentation/devicetree/bindings/iio/adc/ti,adc128s052.yaml
index d54a0183f024..775eee972b12 100644
--- a/Documentation/devicetree/bindings/iio/adc/ti,adc128s052.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/ti,adc128s052.yaml
@@ -27,8 +27,6 @@ properties:
   reg:
     maxItems: 1
 
-  spi-max-frequency: true
-
   vref-supply: true
 
   "#io-channel-cells":
@@ -39,7 +37,10 @@ required:
   - reg
   - vref-supply
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/adc/ti,adc161s626.yaml b/Documentation/devicetree/bindings/iio/adc/ti,adc161s626.yaml
index 3f4f334d6f73..afe782522904 100644
--- a/Documentation/devicetree/bindings/iio/adc/ti,adc161s626.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/ti,adc161s626.yaml
@@ -21,8 +21,6 @@ properties:
   reg:
     maxItems: 1
 
-  spi-max-frequency: true
-
   vdda-supply: true
 
   "#io-channel-cells":
@@ -32,7 +30,10 @@ required:
   - compatible
   - reg
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/adc/ti,ads124s08.yaml b/Documentation/devicetree/bindings/iio/adc/ti,ads124s08.yaml
index 9f5e96439c01..4a6e54debf10 100644
--- a/Documentation/devicetree/bindings/iio/adc/ti,ads124s08.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/ti,ads124s08.yaml
@@ -18,8 +18,6 @@ properties:
   reg:
     maxItems: 1
 
-  spi-max-frequency: true
-
   spi-cpha: true
 
   reset-gpios:
@@ -32,7 +30,10 @@ required:
   - compatible
   - reg
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/adc/ti,ads131e08.yaml b/Documentation/devicetree/bindings/iio/adc/ti,ads131e08.yaml
index e0670e3fbb72..5882de6fd967 100644
--- a/Documentation/devicetree/bindings/iio/adc/ti,ads131e08.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/ti,ads131e08.yaml
@@ -28,8 +28,6 @@ properties:
   reg:
     maxItems: 1
 
-  spi-max-frequency: true
-
   spi-cpha: true
 
   clocks:
@@ -120,7 +118,10 @@ patternProperties:
 
     additionalProperties: false
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/adc/ti,ads8344.yaml b/Documentation/devicetree/bindings/iio/adc/ti,ads8344.yaml
index b8c398187d5c..f75b2c702986 100644
--- a/Documentation/devicetree/bindings/iio/adc/ti,ads8344.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/ti,ads8344.yaml
@@ -19,8 +19,6 @@ properties:
   reg:
     maxItems: 1
 
-  spi-max-frequency: true
-
   vref-supply:
     description: Supply the 2.5V or 5V reference voltage
 
@@ -32,7 +30,10 @@ required:
   - reg
   - vref-supply
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/adc/ti,ads8688.yaml b/Documentation/devicetree/bindings/iio/adc/ti,ads8688.yaml
index a0af4b24877f..f26fdbc15f84 100644
--- a/Documentation/devicetree/bindings/iio/adc/ti,ads8688.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/ti,ads8688.yaml
@@ -25,13 +25,14 @@ properties:
     description: Optional external reference.  If not supplied, assume
       REFSEL input tied low to enable the internal reference.
 
-  spi-max-frequency: true
-
 required:
   - compatible
   - reg
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/adc/ti,tlc4541.yaml b/Documentation/devicetree/bindings/iio/adc/ti,tlc4541.yaml
index 6c2539b3d707..314d1d99bf73 100644
--- a/Documentation/devicetree/bindings/iio/adc/ti,tlc4541.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/ti,tlc4541.yaml
@@ -21,8 +21,6 @@ properties:
   reg:
     maxItems: 1
 
-  spi-max-frequency: true
-
   vref-supply: true
 
   "#io-channel-cells":
@@ -33,7 +31,10 @@ required:
   - reg
   - vref-supply
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/adc/ti,tsc2046.yaml b/Documentation/devicetree/bindings/iio/adc/ti,tsc2046.yaml
index 601d69971d84..0b48814c0dc2 100644
--- a/Documentation/devicetree/bindings/iio/adc/ti,tsc2046.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/ti,tsc2046.yaml
@@ -23,8 +23,6 @@ properties:
   interrupts:
     maxItems: 1
 
-  spi-max-frequency: true
-
   "#io-channel-cells":
     const: 1
 
@@ -59,7 +57,10 @@ patternProperties:
 
     additionalProperties: false
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 02/10] dt-bindings: iio: accel: use spi-peripheral-props.yaml
  2022-07-27 16:46 [PATCH v2 00/10] dt-bindings: iio: use spi-peripheral-props.yaml Krzysztof Kozlowski
  2022-07-27 16:46 ` [PATCH v2 01/10] dt-bindings: iio: adc: " Krzysztof Kozlowski
@ 2022-07-27 16:46 ` Krzysztof Kozlowski
  2022-07-31 15:49   ` Jonathan Cameron
  2022-07-27 16:46 ` [PATCH v2 03/10] dt-bindings: iio: amplifiers: adi,ada4250: " Krzysztof Kozlowski
                   ` (8 subsequent siblings)
  10 siblings, 1 reply; 22+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-27 16:46 UTC (permalink / raw)
  To: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Rob Herring, Krzysztof Kozlowski, Lucas Stankus, Puranjay Mohan,
	Cosmin Tanislav, Alexandru Tachici, Marcelo Schmitt,
	Marcus Folkesson, Kent Gustavsson, Tomislav Denis,
	Oleksij Rempel, kernel, Antoniu Miclaus, Ricardo Ribalda,
	Dragos Bogdan, Jean-Baptiste Maneyrol, Lorenzo Bianconi,
	Stefan Popa, Linus Walleij, Stephan Gerhold, Mike Looijmans,
	Joachim Eastwood, Tomas Melin, Sean Nyekjaer, Beniamin Bia,
	Patrick Vasseur, Charles-Antoine Couret, Vladimir Barinov,
	Miquel Raynal, Philippe Reynes, Jacopo Mondi, Akinobu Mita,
	Alexandru Lazar, Oskar Andero, Mårten Lindahl,
	Bogdan Pricop, Angelo Compagnucci, Matt Ranostay, Dan Murphy,
	Gregory Clement, Phil Reid, Michael Welling, Lukas Wunner,
	Robert Jones, Chris Coffey, Slawomir Stepien, Sankar Velliangiri,
	linux-iio, devicetree, linux-kernel, linux-fbdev
  Cc: Krzysztof Kozlowski

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>

---

I wonder if spi-3wire is device specific (not controller) and should be
rather explicitly mentioned by device schema. Just like spi-cpol/cpha.
---
 .../devicetree/bindings/iio/accel/adi,adis16201.yaml     | 7 ++++---
 .../devicetree/bindings/iio/accel/adi,adis16240.yaml     | 7 ++++---
 .../devicetree/bindings/iio/accel/adi,adxl313.yaml       | 9 ++++-----
 .../devicetree/bindings/iio/accel/adi,adxl345.yaml       | 7 ++++---
 .../devicetree/bindings/iio/accel/adi,adxl355.yaml       | 7 ++++---
 .../devicetree/bindings/iio/accel/adi,adxl367.yaml       | 7 ++++---
 .../devicetree/bindings/iio/accel/adi,adxl372.yaml       | 7 ++++---
 .../devicetree/bindings/iio/accel/bosch,bma220.yaml      | 7 ++++---
 .../devicetree/bindings/iio/accel/bosch,bma255.yaml      | 5 ++++-
 .../devicetree/bindings/iio/accel/bosch,bmi088.yaml      | 7 ++++---
 .../devicetree/bindings/iio/accel/fsl,mma7455.yaml       | 7 ++++---
 .../devicetree/bindings/iio/accel/kionix,kxsd9.yaml      | 7 ++++---
 .../devicetree/bindings/iio/accel/murata,sca3300.yaml    | 5 ++++-
 .../devicetree/bindings/iio/accel/nxp,fxls8962af.yaml    | 7 ++++---
 14 files changed, 56 insertions(+), 40 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adis16201.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adis16201.yaml
index 6f8f8a6258fe..7332442e5661 100644
--- a/Documentation/devicetree/bindings/iio/accel/adi,adis16201.yaml
+++ b/Documentation/devicetree/bindings/iio/accel/adi,adis16201.yaml
@@ -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:
   - |
diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adis16240.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adis16240.yaml
index 8d829ef878bc..f6f97164c2ca 100644
--- a/Documentation/devicetree/bindings/iio/accel/adi,adis16240.yaml
+++ b/Documentation/devicetree/bindings/iio/accel/adi,adis16240.yaml
@@ -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:
   - |
diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adxl313.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adxl313.yaml
index d6afc1b8c272..7c1bc7810528 100644
--- a/Documentation/devicetree/bindings/iio/accel/adi,adxl313.yaml
+++ b/Documentation/devicetree/bindings/iio/accel/adi,adxl313.yaml
@@ -22,10 +22,6 @@ properties:
   reg:
     maxItems: 1
 
-  spi-3wire: true
-
-  spi-max-frequency: true
-
   vs-supply:
     description: Regulator that supplies power to the accelerometer
 
@@ -48,7 +44,10 @@ required:
   - compatible
   - reg
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
index 9bb039e2f533..346abfb13a3a 100644
--- a/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
+++ b/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
@@ -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:
   - |
diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adxl355.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adxl355.yaml
index ba54d6998f2e..14b487088ab4 100644
--- a/Documentation/devicetree/bindings/iio/accel/adi,adxl355.yaml
+++ b/Documentation/devicetree/bindings/iio/accel/adi,adxl355.yaml
@@ -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:
   - |
diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adxl367.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adxl367.yaml
index d259e796c1d6..f10d98d34cb8 100644
--- a/Documentation/devicetree/bindings/iio/accel/adi,adxl367.yaml
+++ b/Documentation/devicetree/bindings/iio/accel/adi,adxl367.yaml
@@ -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:
   - |
diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adxl372.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adxl372.yaml
index 38b59b6454ce..73a5c8f814cc 100644
--- a/Documentation/devicetree/bindings/iio/accel/adi,adxl372.yaml
+++ b/Documentation/devicetree/bindings/iio/accel/adi,adxl372.yaml
@@ -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:
   - |
diff --git a/Documentation/devicetree/bindings/iio/accel/bosch,bma220.yaml b/Documentation/devicetree/bindings/iio/accel/bosch,bma220.yaml
index 942b23ad0712..5dd06f5905b4 100644
--- a/Documentation/devicetree/bindings/iio/accel/bosch,bma220.yaml
+++ b/Documentation/devicetree/bindings/iio/accel/bosch,bma220.yaml
@@ -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:
   - |
diff --git a/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml b/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml
index 478e75ae0885..457a709b583c 100644
--- a/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml
+++ b/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml
@@ -72,7 +72,10 @@ required:
   - compatible
   - reg
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/accel/bosch,bmi088.yaml b/Documentation/devicetree/bindings/iio/accel/bosch,bmi088.yaml
index 272eb48eef5a..3cb82576d758 100644
--- a/Documentation/devicetree/bindings/iio/accel/bosch,bmi088.yaml
+++ b/Documentation/devicetree/bindings/iio/accel/bosch,bmi088.yaml
@@ -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:
   - |
diff --git a/Documentation/devicetree/bindings/iio/accel/fsl,mma7455.yaml b/Documentation/devicetree/bindings/iio/accel/fsl,mma7455.yaml
index 7c8f8bdc2333..589ca8178f4a 100644
--- a/Documentation/devicetree/bindings/iio/accel/fsl,mma7455.yaml
+++ b/Documentation/devicetree/bindings/iio/accel/fsl,mma7455.yaml
@@ -40,13 +40,14 @@ properties:
         - "INT1"
         - "INT2"
 
-  spi-max-frequency: true
-
 required:
   - compatible
   - reg
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/accel/kionix,kxsd9.yaml b/Documentation/devicetree/bindings/iio/accel/kionix,kxsd9.yaml
index 390b87242fcb..f64d99b35492 100644
--- a/Documentation/devicetree/bindings/iio/accel/kionix,kxsd9.yaml
+++ b/Documentation/devicetree/bindings/iio/accel/kionix,kxsd9.yaml
@@ -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:
   - |
diff --git a/Documentation/devicetree/bindings/iio/accel/murata,sca3300.yaml b/Documentation/devicetree/bindings/iio/accel/murata,sca3300.yaml
index f6e2a16a710b..00c990caa1e4 100644
--- a/Documentation/devicetree/bindings/iio/accel/murata,sca3300.yaml
+++ b/Documentation/devicetree/bindings/iio/accel/murata,sca3300.yaml
@@ -29,7 +29,10 @@ required:
   - compatible
   - reg
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/accel/nxp,fxls8962af.yaml b/Documentation/devicetree/bindings/iio/accel/nxp,fxls8962af.yaml
index ad529ab2c6e2..65ce8ea14b52 100644
--- a/Documentation/devicetree/bindings/iio/accel/nxp,fxls8962af.yaml
+++ b/Documentation/devicetree/bindings/iio/accel/nxp,fxls8962af.yaml
@@ -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:
   - |
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 03/10] dt-bindings: iio: amplifiers: adi,ada4250: use spi-peripheral-props.yaml
  2022-07-27 16:46 [PATCH v2 00/10] dt-bindings: iio: use spi-peripheral-props.yaml Krzysztof Kozlowski
  2022-07-27 16:46 ` [PATCH v2 01/10] dt-bindings: iio: adc: " Krzysztof Kozlowski
  2022-07-27 16:46 ` [PATCH v2 02/10] dt-bindings: iio: accel: " Krzysztof Kozlowski
@ 2022-07-27 16:46 ` Krzysztof Kozlowski
  2022-07-27 16:46 ` [PATCH v2 04/10] dt-bindings: iio: dac: " Krzysztof Kozlowski
                   ` (7 subsequent siblings)
  10 siblings, 0 replies; 22+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-27 16:46 UTC (permalink / raw)
  To: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Rob Herring, Krzysztof Kozlowski, Lucas Stankus, Puranjay Mohan,
	Cosmin Tanislav, Alexandru Tachici, Marcelo Schmitt,
	Marcus Folkesson, Kent Gustavsson, Tomislav Denis,
	Oleksij Rempel, kernel, Antoniu Miclaus, Ricardo Ribalda,
	Dragos Bogdan, Jean-Baptiste Maneyrol, Lorenzo Bianconi,
	Stefan Popa, Linus Walleij, Stephan Gerhold, Mike Looijmans,
	Joachim Eastwood, Tomas Melin, Sean Nyekjaer, Beniamin Bia,
	Patrick Vasseur, Charles-Antoine Couret, Vladimir Barinov,
	Miquel Raynal, Philippe Reynes, Jacopo Mondi, Akinobu Mita,
	Alexandru Lazar, Oskar Andero, Mårten Lindahl,
	Bogdan Pricop, Angelo Compagnucci, Matt Ranostay, Dan Murphy,
	Gregory Clement, Phil Reid, Michael Welling, Lukas Wunner,
	Robert Jones, Chris Coffey, Slawomir Stepien, Sankar Velliangiri,
	linux-iio, devicetree, linux-kernel, linux-fbdev
  Cc: Krzysztof Kozlowski

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>
---
 .../devicetree/bindings/iio/amplifiers/adi,ada4250.yaml    | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/amplifiers/adi,ada4250.yaml b/Documentation/devicetree/bindings/iio/amplifiers/adi,ada4250.yaml
index 5277479be382..c15da155d300 100644
--- a/Documentation/devicetree/bindings/iio/amplifiers/adi,ada4250.yaml
+++ b/Documentation/devicetree/bindings/iio/amplifiers/adi,ada4250.yaml
@@ -27,14 +27,15 @@ properties:
       Enable internal buffer to drive the reference pin.
     type: boolean
 
-  spi-max-frequency: true
-
 required:
   - compatible
   - reg
   - avdd-supply
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 04/10] dt-bindings: iio: dac: use spi-peripheral-props.yaml
  2022-07-27 16:46 [PATCH v2 00/10] dt-bindings: iio: use spi-peripheral-props.yaml Krzysztof Kozlowski
                   ` (2 preceding siblings ...)
  2022-07-27 16:46 ` [PATCH v2 03/10] dt-bindings: iio: amplifiers: adi,ada4250: " Krzysztof Kozlowski
@ 2022-07-27 16:46 ` Krzysztof Kozlowski
  2022-07-30 22:43   ` Lukas Wunner
  2022-07-27 16:46 ` [PATCH v2 05/10] dt-bindings: iio: frequency: adf4371: " Krzysztof Kozlowski
                   ` (6 subsequent siblings)
  10 siblings, 1 reply; 22+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-27 16:46 UTC (permalink / raw)
  To: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Rob Herring, Krzysztof Kozlowski, Lucas Stankus, Puranjay Mohan,
	Cosmin Tanislav, Alexandru Tachici, Marcelo Schmitt,
	Marcus Folkesson, Kent Gustavsson, Tomislav Denis,
	Oleksij Rempel, kernel, Antoniu Miclaus, Ricardo Ribalda,
	Dragos Bogdan, Jean-Baptiste Maneyrol, Lorenzo Bianconi,
	Stefan Popa, Linus Walleij, Stephan Gerhold, Mike Looijmans,
	Joachim Eastwood, Tomas Melin, Sean Nyekjaer, Beniamin Bia,
	Patrick Vasseur, Charles-Antoine Couret, Vladimir Barinov,
	Miquel Raynal, Philippe Reynes, Jacopo Mondi, Akinobu Mita,
	Alexandru Lazar, Oskar Andero, Mårten Lindahl,
	Bogdan Pricop, Angelo Compagnucci, Matt Ranostay, Dan Murphy,
	Gregory Clement, Phil Reid, Michael Welling, Lukas Wunner,
	Robert Jones, Chris Coffey, Slawomir Stepien, Sankar Velliangiri,
	linux-iio, devicetree, linux-kernel, linux-fbdev
  Cc: Krzysztof Kozlowski

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>
---
 .../devicetree/bindings/iio/dac/adi,ad5064.yaml          | 7 +++----
 .../devicetree/bindings/iio/dac/adi,ad5360.yaml          | 7 +++----
 .../devicetree/bindings/iio/dac/adi,ad5380.yaml          | 9 +++++----
 .../devicetree/bindings/iio/dac/adi,ad5421.yaml          | 7 ++++---
 .../devicetree/bindings/iio/dac/adi,ad5449.yaml          | 7 +++----
 .../devicetree/bindings/iio/dac/adi,ad5624r.yaml         | 9 +++++----
 .../devicetree/bindings/iio/dac/adi,ad5686.yaml          | 9 +++++----
 .../devicetree/bindings/iio/dac/adi,ad5755.yaml          | 9 +++++----
 .../devicetree/bindings/iio/dac/adi,ad5758.yaml          | 4 ++--
 .../devicetree/bindings/iio/dac/adi,ad5761.yaml          | 7 +++----
 .../devicetree/bindings/iio/dac/adi,ad5764.yaml          | 7 +++----
 .../devicetree/bindings/iio/dac/adi,ad5770r.yaml         | 7 ++++---
 .../devicetree/bindings/iio/dac/adi,ad5791.yaml          | 9 +++++----
 .../devicetree/bindings/iio/dac/adi,ad8801.yaml          | 7 +++----
 .../devicetree/bindings/iio/dac/microchip,mcp4922.yaml   | 9 +++++----
 .../devicetree/bindings/iio/dac/ti,dac082s085.yaml       | 9 +++++----
 .../devicetree/bindings/iio/dac/ti,dac7311.yaml          | 7 ++++---
 .../devicetree/bindings/iio/dac/ti,dac7612.yaml          | 7 ++++---
 18 files changed, 71 insertions(+), 66 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5064.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5064.yaml
index 05ed4e0ec364..c04165fa9259 100644
--- a/Documentation/devicetree/bindings/iio/dac/adi,ad5064.yaml
+++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5064.yaml
@@ -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 {
diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5360.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5360.yaml
index 65f86f26947c..86e2884cdfb1 100644
--- a/Documentation/devicetree/bindings/iio/dac/adi,ad5360.yaml
+++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5360.yaml
@@ -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 {
diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5380.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5380.yaml
index d599b418a020..ff50c72c62b5 100644
--- a/Documentation/devicetree/bindings/iio/dac/adi,ad5380.yaml
+++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5380.yaml
@@ -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 {
diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5421.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5421.yaml
index 188f656617e3..52d089ebde95 100644
--- a/Documentation/devicetree/bindings/iio/dac/adi,ad5421.yaml
+++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5421.yaml
@@ -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:
   - |
diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5449.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5449.yaml
index 044332c97743..d2af2d491986 100644
--- a/Documentation/devicetree/bindings/iio/dac/adi,ad5449.yaml
+++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5449.yaml
@@ -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 {
diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5624r.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5624r.yaml
index 330383b85eeb..4d5111a5f9bd 100644
--- a/Documentation/devicetree/bindings/iio/dac/adi,ad5624r.yaml
+++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5624r.yaml
@@ -22,17 +22,18 @@ properties:
   reg:
     maxItems: 1
 
-  spi-max-frequency: true
-
   vref-supply:
     description: If not present, internal reference will be used.
 
-additionalProperties: false
-
 required:
   - compatible
   - reg
 
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
+
 examples:
   - |
     spi {
diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5686.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5686.yaml
index 5c26441eae9f..13f214234b8e 100644
--- a/Documentation/devicetree/bindings/iio/dac/adi,ad5686.yaml
+++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5686.yaml
@@ -53,14 +53,15 @@ properties:
   vcc-supply:
     description: If not supplied the internal reference is used.
 
-  spi-max-frequency: true
-
-additionalProperties: false
-
 required:
   - compatible
   - reg
 
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
+
 examples:
   - |
     spi {
diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5755.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5755.yaml
index f866b88e1440..9a3c2926bf85 100644
--- a/Documentation/devicetree/bindings/iio/dac/adi,ad5755.yaml
+++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5755.yaml
@@ -25,8 +25,6 @@ properties:
     description: Either this or spi-cpol but not both.
   spi-cpol: true
 
-  spi-max-frequency: true
-
   adi,ext-dc-dc-compenstation-resistor:
     $ref: /schemas/types.yaml#/definitions/flag
     description:
@@ -67,8 +65,6 @@ required:
   - compatible
   - reg
 
-additionalProperties: false
-
 patternProperties:
   "^channel@[0-7]$":
     type: object
@@ -123,6 +119,11 @@ oneOf:
   - required:
       - spi-cpol
 
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
+
 examples:
   - |
     spi {
diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5758.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5758.yaml
index fd4edca34a28..e49e7556175d 100644
--- a/Documentation/devicetree/bindings/iio/dac/adi,ad5758.yaml
+++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5758.yaml
@@ -16,7 +16,6 @@ properties:
   reg:
     maxItems: 1
 
-  spi-max-frequency: true
   spi-cpha: true
 
   adi,dc-dc-mode:
@@ -99,6 +98,7 @@ required:
   - adi,dc-dc-mode
 
 allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
   - if:
       properties:
         adi,dc-dc-mode:
@@ -115,7 +115,7 @@ allOf:
       required:
         - adi,range-microvolt
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5761.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5761.yaml
index 7f95a9ed55fe..df550b5af2f7 100644
--- a/Documentation/devicetree/bindings/iio/dac/adi,ad5761.yaml
+++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5761.yaml
@@ -22,18 +22,15 @@ properties:
   reg:
     maxItems: 1
 
-  spi-max-frequency: true
-
   vref-supply:
     description: If not supplied, internal reference will be used.
 
-additionalProperties: false
-
 required:
   - compatible
   - reg
 
 allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
   - if:
       properties:
         compatible:
@@ -45,6 +42,8 @@ allOf:
       required:
         - vref-supply
 
+unevaluatedProperties: false
+
 examples:
   - |
     spi {
diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5764.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5764.yaml
index 8e893d52bfb1..0b409a727a43 100644
--- a/Documentation/devicetree/bindings/iio/dac/adi,ad5764.yaml
+++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5764.yaml
@@ -22,18 +22,15 @@ properties:
   reg:
     maxItems: 1
 
-  spi-max-frequency: true
-
   vrefAB-supply: true
   vrefCD-supply: true
 
-additionalProperties: false
-
 required:
   - compatible
   - reg
 
 allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
   - if:
       properties:
         compatible:
@@ -46,6 +43,8 @@ allOf:
         - vrefAB-supply
         - vrefCD-supply
 
+unevaluatedProperties: false
+
 examples:
   - |
     spi {
diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5770r.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5770r.yaml
index 24ac40180ac1..ca5432ffdedb 100644
--- a/Documentation/devicetree/bindings/iio/dac/adi,ad5770r.yaml
+++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5770r.yaml
@@ -49,8 +49,6 @@ properties:
       asserted during driver probe.
     maxItems: 1
 
-  spi-max-frequency: true
-
   '#address-cells':
     const: 1
 
@@ -138,7 +136,10 @@ required:
   - channel@4
   - channel@5
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5791.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5791.yaml
index 650d1ebdcec3..3a84739736f6 100644
--- a/Documentation/devicetree/bindings/iio/dac/adi,ad5791.yaml
+++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5791.yaml
@@ -23,19 +23,20 @@ properties:
   reg:
     maxItems: 1
 
-  spi-max-frequency: true
-
   vdd-supply: true
   vss-supply: true
 
-additionalProperties: false
-
 required:
   - compatible
   - reg
   - vdd-supply
   - vss-supply
 
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
+
 examples:
   - |
     spi {
diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad8801.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad8801.yaml
index 6a3990a8d0ad..1849a2ff05c7 100644
--- a/Documentation/devicetree/bindings/iio/dac/adi,ad8801.yaml
+++ b/Documentation/devicetree/bindings/iio/dac/adi,ad8801.yaml
@@ -19,19 +19,16 @@ properties:
   reg:
     maxItems: 1
 
-  spi-max-frequency: true
-
   vrefh-supply: true
   vrefl-supply: true
 
-additionalProperties: false
-
 required:
   - compatible
   - reg
   - vrefh-supply
 
 allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
   - if:
       properties:
         compatible:
@@ -44,6 +41,8 @@ allOf:
       properties:
         vrefl-supply: false
 
+unevaluatedProperties: false
+
 examples:
   - |
     spi {
diff --git a/Documentation/devicetree/bindings/iio/dac/microchip,mcp4922.yaml b/Documentation/devicetree/bindings/iio/dac/microchip,mcp4922.yaml
index 4c430abcdbf9..19374401e509 100644
--- a/Documentation/devicetree/bindings/iio/dac/microchip,mcp4922.yaml
+++ b/Documentation/devicetree/bindings/iio/dac/microchip,mcp4922.yaml
@@ -21,17 +21,18 @@ properties:
   reg:
     maxItems: 1
 
-  spi-max-frequency: true
-
   vref-supply: true
 
-additionalProperties: false
-
 required:
   - compatible
   - reg
   - vref-supply
 
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
+
 examples:
   - |
     spi {
diff --git a/Documentation/devicetree/bindings/iio/dac/ti,dac082s085.yaml b/Documentation/devicetree/bindings/iio/dac/ti,dac082s085.yaml
index b0157050f1ee..201b04af2b22 100644
--- a/Documentation/devicetree/bindings/iio/dac/ti,dac082s085.yaml
+++ b/Documentation/devicetree/bindings/iio/dac/ti,dac082s085.yaml
@@ -33,21 +33,22 @@ properties:
   vref-supply:
     description: Needed to provide output scaling.
 
-  spi-max-frequency: true
-
 required:
   - compatible
   - reg
   - vref-supply
 
-additionalProperties: false
-
 oneOf:
   - required:
       - spi-cpha
   - required:
       - spi-cpol
 
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
+
 examples:
   - |
     vref_2v5_reg: regulator-vref {
diff --git a/Documentation/devicetree/bindings/iio/dac/ti,dac7311.yaml b/Documentation/devicetree/bindings/iio/dac/ti,dac7311.yaml
index 10be98d1f19c..a6814587dbc4 100644
--- a/Documentation/devicetree/bindings/iio/dac/ti,dac7311.yaml
+++ b/Documentation/devicetree/bindings/iio/dac/ti,dac7311.yaml
@@ -24,14 +24,15 @@ properties:
       Reference voltage must be supplied to establish the scaling of the
       output voltage.
 
-  spi-max-frequency: true
-
 required:
   - compatible
   - reg
   - vref-supply
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/dac/ti,dac7612.yaml b/Documentation/devicetree/bindings/iio/dac/ti,dac7612.yaml
index d172b142f6ed..20dd1370660d 100644
--- a/Documentation/devicetree/bindings/iio/dac/ti,dac7612.yaml
+++ b/Documentation/devicetree/bindings/iio/dac/ti,dac7612.yaml
@@ -29,13 +29,14 @@ properties:
       DACs are loaded when the pin connected to this GPIO is pulled low.
     maxItems: 1
 
-  spi-max-frequency: true
-
 required:
   - compatible
   - reg
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 05/10] dt-bindings: iio: frequency: adf4371: use spi-peripheral-props.yaml
  2022-07-27 16:46 [PATCH v2 00/10] dt-bindings: iio: use spi-peripheral-props.yaml Krzysztof Kozlowski
                   ` (3 preceding siblings ...)
  2022-07-27 16:46 ` [PATCH v2 04/10] dt-bindings: iio: dac: " Krzysztof Kozlowski
@ 2022-07-27 16:46 ` Krzysztof Kozlowski
  2022-07-27 16:46 ` [PATCH v2 06/10] dt-bindings: iio: health: ti,afe4403: " Krzysztof Kozlowski
                   ` (5 subsequent siblings)
  10 siblings, 0 replies; 22+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-27 16:46 UTC (permalink / raw)
  To: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Rob Herring, Krzysztof Kozlowski, Lucas Stankus, Puranjay Mohan,
	Cosmin Tanislav, Alexandru Tachici, Marcelo Schmitt,
	Marcus Folkesson, Kent Gustavsson, Tomislav Denis,
	Oleksij Rempel, kernel, Antoniu Miclaus, Ricardo Ribalda,
	Dragos Bogdan, Jean-Baptiste Maneyrol, Lorenzo Bianconi,
	Stefan Popa, Linus Walleij, Stephan Gerhold, Mike Looijmans,
	Joachim Eastwood, Tomas Melin, Sean Nyekjaer, Beniamin Bia,
	Patrick Vasseur, Charles-Antoine Couret, Vladimir Barinov,
	Miquel Raynal, Philippe Reynes, Jacopo Mondi, Akinobu Mita,
	Alexandru Lazar, Oskar Andero, Mårten Lindahl,
	Bogdan Pricop, Angelo Compagnucci, Matt Ranostay, Dan Murphy,
	Gregory Clement, Phil Reid, Michael Welling, Lukas Wunner,
	Robert Jones, Chris Coffey, Slawomir Stepien, Sankar Velliangiri,
	linux-iio, devicetree, linux-kernel, linux-fbdev
  Cc: Krzysztof Kozlowski

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>
---
 .../devicetree/bindings/iio/frequency/adf4371.yaml         | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/frequency/adf4371.yaml b/Documentation/devicetree/bindings/iio/frequency/adf4371.yaml
index 6b3a611e1cf1..0144f74a4768 100644
--- a/Documentation/devicetree/bindings/iio/frequency/adf4371.yaml
+++ b/Documentation/devicetree/bindings/iio/frequency/adf4371.yaml
@@ -40,15 +40,16 @@ properties:
       output stage will shut down until the ADF4371/ADF4372 achieves lock as
       measured by the digital lock detect circuitry.
 
-  spi-max-frequency: true
-
 required:
   - compatible
   - reg
   - clocks
   - clock-names
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 06/10] dt-bindings: iio: health: ti,afe4403: use spi-peripheral-props.yaml
  2022-07-27 16:46 [PATCH v2 00/10] dt-bindings: iio: use spi-peripheral-props.yaml Krzysztof Kozlowski
                   ` (4 preceding siblings ...)
  2022-07-27 16:46 ` [PATCH v2 05/10] dt-bindings: iio: frequency: adf4371: " Krzysztof Kozlowski
@ 2022-07-27 16:46 ` Krzysztof Kozlowski
  2022-07-27 16:46 ` [PATCH v2 07/10] dt-bindings: iio: imu: " Krzysztof Kozlowski
                   ` (4 subsequent siblings)
  10 siblings, 0 replies; 22+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-27 16:46 UTC (permalink / raw)
  To: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Rob Herring, Krzysztof Kozlowski, Lucas Stankus, Puranjay Mohan,
	Cosmin Tanislav, Alexandru Tachici, Marcelo Schmitt,
	Marcus Folkesson, Kent Gustavsson, Tomislav Denis,
	Oleksij Rempel, kernel, Antoniu Miclaus, Ricardo Ribalda,
	Dragos Bogdan, Jean-Baptiste Maneyrol, Lorenzo Bianconi,
	Stefan Popa, Linus Walleij, Stephan Gerhold, Mike Looijmans,
	Joachim Eastwood, Tomas Melin, Sean Nyekjaer, Beniamin Bia,
	Patrick Vasseur, Charles-Antoine Couret, Vladimir Barinov,
	Miquel Raynal, Philippe Reynes, Jacopo Mondi, Akinobu Mita,
	Alexandru Lazar, Oskar Andero, Mårten Lindahl,
	Bogdan Pricop, Angelo Compagnucci, Matt Ranostay, Dan Murphy,
	Gregory Clement, Phil Reid, Michael Welling, Lukas Wunner,
	Robert Jones, Chris Coffey, Slawomir Stepien, Sankar Velliangiri,
	linux-iio, devicetree, linux-kernel, linux-fbdev
  Cc: Krzysztof Kozlowski

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>
---
 .../devicetree/bindings/iio/health/ti,afe4403.yaml       | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/health/ti,afe4403.yaml b/Documentation/devicetree/bindings/iio/health/ti,afe4403.yaml
index d861526c5c42..6c5ad426a016 100644
--- a/Documentation/devicetree/bindings/iio/health/ti,afe4403.yaml
+++ b/Documentation/devicetree/bindings/iio/health/ti,afe4403.yaml
@@ -25,14 +25,15 @@ properties:
 
   reset-gpios: true
 
-  spi-max-frequency: true
-
-additionalProperties: false
-
 required:
   - compatible
   - reg
 
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
+
 examples:
   - |
     #include <dt-bindings/gpio/gpio.h>
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 07/10] dt-bindings: iio: imu: use spi-peripheral-props.yaml
  2022-07-27 16:46 [PATCH v2 00/10] dt-bindings: iio: use spi-peripheral-props.yaml Krzysztof Kozlowski
                   ` (5 preceding siblings ...)
  2022-07-27 16:46 ` [PATCH v2 06/10] dt-bindings: iio: health: ti,afe4403: " Krzysztof Kozlowski
@ 2022-07-27 16:46 ` Krzysztof Kozlowski
  2022-07-27 16:46 ` [PATCH v2 08/10] dt-bindings: iio: potentiometer: " Krzysztof Kozlowski
                   ` (3 subsequent siblings)
  10 siblings, 0 replies; 22+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-27 16:46 UTC (permalink / raw)
  To: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Rob Herring, Krzysztof Kozlowski, Lucas Stankus, Puranjay Mohan,
	Cosmin Tanislav, Alexandru Tachici, Marcelo Schmitt,
	Marcus Folkesson, Kent Gustavsson, Tomislav Denis,
	Oleksij Rempel, kernel, Antoniu Miclaus, Ricardo Ribalda,
	Dragos Bogdan, Jean-Baptiste Maneyrol, Lorenzo Bianconi,
	Stefan Popa, Linus Walleij, Stephan Gerhold, Mike Looijmans,
	Joachim Eastwood, Tomas Melin, Sean Nyekjaer, Beniamin Bia,
	Patrick Vasseur, Charles-Antoine Couret, Vladimir Barinov,
	Miquel Raynal, Philippe Reynes, Jacopo Mondi, Akinobu Mita,
	Alexandru Lazar, Oskar Andero, Mårten Lindahl,
	Bogdan Pricop, Angelo Compagnucci, Matt Ranostay, Dan Murphy,
	Gregory Clement, Phil Reid, Michael Welling, Lukas Wunner,
	Robert Jones, Chris Coffey, Slawomir Stepien, Sankar Velliangiri,
	linux-iio, devicetree, linux-kernel, linux-fbdev
  Cc: Krzysztof Kozlowski

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>
---
 .../devicetree/bindings/iio/imu/adi,adis16460.yaml       | 7 ++++---
 .../devicetree/bindings/iio/imu/adi,adis16480.yaml       | 9 +++++----
 .../devicetree/bindings/iio/imu/bosch,bmi160.yaml        | 7 ++++---
 .../devicetree/bindings/iio/imu/invensense,icm42600.yaml | 6 ++++--
 .../devicetree/bindings/iio/imu/invensense,mpu6050.yaml  | 5 ++---
 .../devicetree/bindings/iio/imu/nxp,fxos8700.yaml        | 7 ++++---
 .../devicetree/bindings/iio/imu/st,lsm6dsx.yaml          | 9 +++++----
 7 files changed, 28 insertions(+), 22 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/imu/adi,adis16460.yaml b/Documentation/devicetree/bindings/iio/imu/adi,adis16460.yaml
index 340be256f283..d166dbca18c3 100644
--- a/Documentation/devicetree/bindings/iio/imu/adi,adis16460.yaml
+++ b/Documentation/devicetree/bindings/iio/imu/adi,adis16460.yaml
@@ -25,8 +25,6 @@ properties:
 
   spi-cpol: true
 
-  spi-max-frequency: true
-
   interrupts:
     maxItems: 1
 
@@ -35,7 +33,10 @@ required:
   - reg
   - interrupts
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/imu/adi,adis16480.yaml b/Documentation/devicetree/bindings/iio/imu/adi,adis16480.yaml
index dd29dc6c4c19..56e0dc20f5e4 100644
--- a/Documentation/devicetree/bindings/iio/imu/adi,adis16480.yaml
+++ b/Documentation/devicetree/bindings/iio/imu/adi,adis16480.yaml
@@ -47,8 +47,6 @@ properties:
         - DIO3
         - DIO4
 
-  spi-max-frequency: true
-
   spi-cpha: true
   spi-cpol: true
 
@@ -96,8 +94,6 @@ properties:
       - DIO3
       - DIO4
 
-additionalProperties: false
-
 required:
   - compatible
   - reg
@@ -106,6 +102,11 @@ required:
   - spi-cpol
   - spi-max-frequency
 
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
+
 examples:
   - |
     #include <dt-bindings/interrupt-controller/irq.h>
diff --git a/Documentation/devicetree/bindings/iio/imu/bosch,bmi160.yaml b/Documentation/devicetree/bindings/iio/imu/bosch,bmi160.yaml
index 6e73cd889b5c..a0760382548d 100644
--- a/Documentation/devicetree/bindings/iio/imu/bosch,bmi160.yaml
+++ b/Documentation/devicetree/bindings/iio/imu/bosch,bmi160.yaml
@@ -46,13 +46,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:
   - |
diff --git a/Documentation/devicetree/bindings/iio/imu/invensense,icm42600.yaml b/Documentation/devicetree/bindings/iio/imu/invensense,icm42600.yaml
index 4c1c083d0e92..488349755c99 100644
--- a/Documentation/devicetree/bindings/iio/imu/invensense,icm42600.yaml
+++ b/Documentation/devicetree/bindings/iio/imu/invensense,icm42600.yaml
@@ -47,7 +47,6 @@ properties:
   vddio-supply:
     description: Regulator that provides power to the bus
 
-  spi-max-frequency: true
   spi-cpha: true
   spi-cpol: true
 
@@ -56,7 +55,10 @@ required:
   - reg
   - interrupts
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/imu/invensense,mpu6050.yaml b/Documentation/devicetree/bindings/iio/imu/invensense,mpu6050.yaml
index 3ebc6526d82d..ec64d7877fe5 100644
--- a/Documentation/devicetree/bindings/iio/imu/invensense,mpu6050.yaml
+++ b/Documentation/devicetree/bindings/iio/imu/invensense,mpu6050.yaml
@@ -40,8 +40,6 @@ properties:
   interrupts:
     maxItems: 1
 
-  spi-max-frequency: true
-
   vdd-supply: true
   vddio-supply: true
 
@@ -54,6 +52,7 @@ properties:
       These devices also support an auxiliary i2c bus via an i2c-gate.
 
 allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
   - if:
       not:
         properties:
@@ -67,7 +66,7 @@ allOf:
       properties:
         i2c-gate: false
 
-additionalProperties: false
+unevaluatedProperties: false
 
 required:
   - compatible
diff --git a/Documentation/devicetree/bindings/iio/imu/nxp,fxos8700.yaml b/Documentation/devicetree/bindings/iio/imu/nxp,fxos8700.yaml
index 479e7065d4eb..beeaa3c902cd 100644
--- a/Documentation/devicetree/bindings/iio/imu/nxp,fxos8700.yaml
+++ b/Documentation/devicetree/bindings/iio/imu/nxp,fxos8700.yaml
@@ -36,13 +36,14 @@ properties:
   drive-open-drain:
     type: boolean
 
-  spi-max-frequency: true
-
 required:
   - compatible
   - reg
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml b/Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml
index 5d4839f00898..0ceb29fb01b7 100644
--- a/Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml
+++ b/Documentation/devicetree/bindings/iio/imu/st,lsm6dsx.yaml
@@ -45,8 +45,6 @@ properties:
     description:
       Supports up to 2 interrupt lines via the INT1 and INT2 pins.
 
-  spi-max-frequency: true
-
   vdd-supply:
     description: if defined provides VDD power to the sensor.
 
@@ -81,12 +79,15 @@ properties:
   wakeup-source:
     $ref: /schemas/types.yaml#/definitions/flag
 
-additionalProperties: false
-
 required:
   - compatible
   - reg
 
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
+
 examples:
   - |
     #include <dt-bindings/interrupt-controller/irq.h>
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 08/10] dt-bindings: iio: potentiometer: use spi-peripheral-props.yaml
  2022-07-27 16:46 [PATCH v2 00/10] dt-bindings: iio: use spi-peripheral-props.yaml Krzysztof Kozlowski
                   ` (6 preceding siblings ...)
  2022-07-27 16:46 ` [PATCH v2 07/10] dt-bindings: iio: imu: " Krzysztof Kozlowski
@ 2022-07-27 16:46 ` Krzysztof Kozlowski
  2022-07-27 16:46 ` [PATCH v2 09/10] dt-bindings: iio: samsung,sensorhub-rinato: " Krzysztof Kozlowski
                   ` (2 subsequent siblings)
  10 siblings, 0 replies; 22+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-27 16:46 UTC (permalink / raw)
  To: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Rob Herring, Krzysztof Kozlowski, Lucas Stankus, Puranjay Mohan,
	Cosmin Tanislav, Alexandru Tachici, Marcelo Schmitt,
	Marcus Folkesson, Kent Gustavsson, Tomislav Denis,
	Oleksij Rempel, kernel, Antoniu Miclaus, Ricardo Ribalda,
	Dragos Bogdan, Jean-Baptiste Maneyrol, Lorenzo Bianconi,
	Stefan Popa, Linus Walleij, Stephan Gerhold, Mike Looijmans,
	Joachim Eastwood, Tomas Melin, Sean Nyekjaer, Beniamin Bia,
	Patrick Vasseur, Charles-Antoine Couret, Vladimir Barinov,
	Miquel Raynal, Philippe Reynes, Jacopo Mondi, Akinobu Mita,
	Alexandru Lazar, Oskar Andero, Mårten Lindahl,
	Bogdan Pricop, Angelo Compagnucci, Matt Ranostay, Dan Murphy,
	Gregory Clement, Phil Reid, Michael Welling, Lukas Wunner,
	Robert Jones, Chris Coffey, Slawomir Stepien, Sankar Velliangiri,
	linux-iio, devicetree, linux-kernel, linux-fbdev
  Cc: Krzysztof Kozlowski

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>
---
 .../bindings/iio/potentiometer/microchip,mcp41010.yaml   | 9 +++++----
 .../bindings/iio/potentiometer/microchip,mcp4131.yaml    | 9 +++++----
 2 files changed, 10 insertions(+), 8 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/potentiometer/microchip,mcp41010.yaml b/Documentation/devicetree/bindings/iio/potentiometer/microchip,mcp41010.yaml
index 567697d996ec..87e88f2a9908 100644
--- a/Documentation/devicetree/bindings/iio/potentiometer/microchip,mcp41010.yaml
+++ b/Documentation/devicetree/bindings/iio/potentiometer/microchip,mcp41010.yaml
@@ -25,14 +25,15 @@ properties:
   reg:
     maxItems: 1
 
-  spi-max-frequency: true
-
-additionalProperties: false
-
 required:
   - compatible
   - reg
 
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
+
 examples:
   - |
     spi {
diff --git a/Documentation/devicetree/bindings/iio/potentiometer/microchip,mcp4131.yaml b/Documentation/devicetree/bindings/iio/potentiometer/microchip,mcp4131.yaml
index 32e92bced81f..896fe0b5edcc 100644
--- a/Documentation/devicetree/bindings/iio/potentiometer/microchip,mcp4131.yaml
+++ b/Documentation/devicetree/bindings/iio/potentiometer/microchip,mcp4131.yaml
@@ -80,14 +80,15 @@ properties:
   reg:
     maxItems: 1
 
-  spi-max-frequency: true
-
-additionalProperties: false
-
 required:
   - compatible
   - reg
 
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
+
 examples:
   - |
     spi {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 09/10] dt-bindings: iio: samsung,sensorhub-rinato: use spi-peripheral-props.yaml
  2022-07-27 16:46 [PATCH v2 00/10] dt-bindings: iio: use spi-peripheral-props.yaml Krzysztof Kozlowski
                   ` (7 preceding siblings ...)
  2022-07-27 16:46 ` [PATCH v2 08/10] dt-bindings: iio: potentiometer: " Krzysztof Kozlowski
@ 2022-07-27 16:46 ` Krzysztof Kozlowski
  2022-07-27 16:46 ` [PATCH v2 10/10] dt-bindings: iio: temperature: " Krzysztof Kozlowski
  2022-07-30 22:46 ` [PATCH v2 00/10] dt-bindings: iio: " Lukas Wunner
  10 siblings, 0 replies; 22+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-27 16:46 UTC (permalink / raw)
  To: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Rob Herring, Krzysztof Kozlowski, Lucas Stankus, Puranjay Mohan,
	Cosmin Tanislav, Alexandru Tachici, Marcelo Schmitt,
	Marcus Folkesson, Kent Gustavsson, Tomislav Denis,
	Oleksij Rempel, kernel, Antoniu Miclaus, Ricardo Ribalda,
	Dragos Bogdan, Jean-Baptiste Maneyrol, Lorenzo Bianconi,
	Stefan Popa, Linus Walleij, Stephan Gerhold, Mike Looijmans,
	Joachim Eastwood, Tomas Melin, Sean Nyekjaer, Beniamin Bia,
	Patrick Vasseur, Charles-Antoine Couret, Vladimir Barinov,
	Miquel Raynal, Philippe Reynes, Jacopo Mondi, Akinobu Mita,
	Alexandru Lazar, Oskar Andero, Mårten Lindahl,
	Bogdan Pricop, Angelo Compagnucci, Matt Ranostay, Dan Murphy,
	Gregory Clement, Phil Reid, Michael Welling, Lukas Wunner,
	Robert Jones, Chris Coffey, Slawomir Stepien, Sankar Velliangiri,
	linux-iio, devicetree, linux-kernel, linux-fbdev
  Cc: Krzysztof Kozlowski

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>
---
 .../bindings/iio/samsung,sensorhub-rinato.yaml           | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/samsung,sensorhub-rinato.yaml b/Documentation/devicetree/bindings/iio/samsung,sensorhub-rinato.yaml
index a88b3b14d6bd..dd2ae2bd1ad7 100644
--- a/Documentation/devicetree/bindings/iio/samsung,sensorhub-rinato.yaml
+++ b/Documentation/devicetree/bindings/iio/samsung,sensorhub-rinato.yaml
@@ -40,10 +40,6 @@ properties:
     description:
       Reset the sensorhub.
 
-  spi-max-frequency: true
-
-additionalProperties: false
-
 required:
   - compatible
   - reg
@@ -52,6 +48,11 @@ required:
   - mcu-ap-gpios
   - mcu-reset-gpios
 
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
+
 examples:
   - |
     spi {
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* [PATCH v2 10/10] dt-bindings: iio: temperature: use spi-peripheral-props.yaml
  2022-07-27 16:46 [PATCH v2 00/10] dt-bindings: iio: use spi-peripheral-props.yaml Krzysztof Kozlowski
                   ` (8 preceding siblings ...)
  2022-07-27 16:46 ` [PATCH v2 09/10] dt-bindings: iio: samsung,sensorhub-rinato: " Krzysztof Kozlowski
@ 2022-07-27 16:46 ` Krzysztof Kozlowski
  2022-07-30 22:46 ` [PATCH v2 00/10] dt-bindings: iio: " Lukas Wunner
  10 siblings, 0 replies; 22+ messages in thread
From: Krzysztof Kozlowski @ 2022-07-27 16:46 UTC (permalink / raw)
  To: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Rob Herring, Krzysztof Kozlowski, Lucas Stankus, Puranjay Mohan,
	Cosmin Tanislav, Alexandru Tachici, Marcelo Schmitt,
	Marcus Folkesson, Kent Gustavsson, Tomislav Denis,
	Oleksij Rempel, kernel, Antoniu Miclaus, Ricardo Ribalda,
	Dragos Bogdan, Jean-Baptiste Maneyrol, Lorenzo Bianconi,
	Stefan Popa, Linus Walleij, Stephan Gerhold, Mike Looijmans,
	Joachim Eastwood, Tomas Melin, Sean Nyekjaer, Beniamin Bia,
	Patrick Vasseur, Charles-Antoine Couret, Vladimir Barinov,
	Miquel Raynal, Philippe Reynes, Jacopo Mondi, Akinobu Mita,
	Alexandru Lazar, Oskar Andero, Mårten Lindahl,
	Bogdan Pricop, Angelo Compagnucci, Matt Ranostay, Dan Murphy,
	Gregory Clement, Phil Reid, Michael Welling, Lukas Wunner,
	Robert Jones, Chris Coffey, Slawomir Stepien, Sankar Velliangiri,
	linux-iio, devicetree, linux-kernel, linux-fbdev
  Cc: Krzysztof Kozlowski

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>
---
 .../bindings/iio/temperature/maxim,max31855k.yaml           | 4 ++--
 .../devicetree/bindings/iio/temperature/maxim,max31856.yaml | 6 ++++--
 .../devicetree/bindings/iio/temperature/maxim,max31865.yaml | 6 ++++--
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/iio/temperature/maxim,max31855k.yaml b/Documentation/devicetree/bindings/iio/temperature/maxim,max31855k.yaml
index 9969bac66aa1..0805ed7e2113 100644
--- a/Documentation/devicetree/bindings/iio/temperature/maxim,max31855k.yaml
+++ b/Documentation/devicetree/bindings/iio/temperature/maxim,max31855k.yaml
@@ -32,7 +32,6 @@ properties:
   reg:
     maxItems: 1
 
-  spi-max-frequency: true
   spi-cpha: true
 
 required:
@@ -40,6 +39,7 @@ required:
   - reg
 
 allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
   - if:
       properties:
         compatible:
@@ -53,7 +53,7 @@ allOf:
       properties:
         spi-cpha: false
 
-additionalProperties: false
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/temperature/maxim,max31856.yaml b/Documentation/devicetree/bindings/iio/temperature/maxim,max31856.yaml
index 873b34766676..228a94165487 100644
--- a/Documentation/devicetree/bindings/iio/temperature/maxim,max31856.yaml
+++ b/Documentation/devicetree/bindings/iio/temperature/maxim,max31856.yaml
@@ -19,7 +19,6 @@ properties:
   reg:
     maxItems: 1
 
-  spi-max-frequency: true
   spi-cpha: true
 
   thermocouple-type:
@@ -34,7 +33,10 @@ required:
   - reg
   - spi-cpha
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
diff --git a/Documentation/devicetree/bindings/iio/temperature/maxim,max31865.yaml b/Documentation/devicetree/bindings/iio/temperature/maxim,max31865.yaml
index aafb33b16549..a2823ed6867b 100644
--- a/Documentation/devicetree/bindings/iio/temperature/maxim,max31865.yaml
+++ b/Documentation/devicetree/bindings/iio/temperature/maxim,max31865.yaml
@@ -25,7 +25,6 @@ properties:
       enables 3-wire RTD connection. Else 2-wire or 4-wire RTD connection.
     type: boolean
 
-  spi-max-frequency: true
   spi-cpha: true
 
 required:
@@ -33,7 +32,10 @@ required:
   - reg
   - spi-cpha
 
-additionalProperties: false
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
 
 examples:
   - |
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 01/10] dt-bindings: iio: adc: use spi-peripheral-props.yaml
  2022-07-27 16:46 ` [PATCH v2 01/10] dt-bindings: iio: adc: " Krzysztof Kozlowski
@ 2022-07-27 16:56   ` Marcus Folkesson
  0 siblings, 0 replies; 22+ messages in thread
From: Marcus Folkesson @ 2022-07-27 16:56 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Rob Herring, Krzysztof Kozlowski, Lucas Stankus, Puranjay Mohan,
	Cosmin Tanislav, Alexandru Tachici, Marcelo Schmitt,
	Kent Gustavsson, Tomislav Denis, Oleksij Rempel, kernel,
	Antoniu Miclaus, Ricardo Ribalda, Dragos Bogdan,
	Jean-Baptiste Maneyrol, Lorenzo Bianconi, Stefan Popa,
	Linus Walleij, Stephan Gerhold, Mike Looijmans, Joachim Eastwood,
	Tomas Melin, Sean Nyekjaer, Beniamin Bia, Patrick Vasseur,
	Charles-Antoine Couret, Vladimir Barinov, Miquel Raynal,
	Philippe Reynes, Jacopo Mondi, Akinobu Mita, Alexandru Lazar,
	Oskar Andero, Mårten Lindahl, Bogdan Pricop,
	Angelo Compagnucci, Matt Ranostay, Dan Murphy, Gregory Clement,
	Phil Reid, Michael Welling, Lukas Wunner, Robert Jones,
	Chris Coffey, Slawomir Stepien, Sankar Velliangiri, linux-iio,
	devicetree, linux-kernel, linux-fbdev

[-- Attachment #1: Type: text/plain, Size: 847 bytes --]

On Wed, Jul 27, 2022 at 06:46:37PM +0200, Krzysztof Kozlowski wrote:
> 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>
> ---
[...]
>  .../bindings/iio/adc/microchip,mcp3911.yaml   |  5 +++-

FWIW: 
Reviewed-by: Marcus Folkesson <marcus.folkesson@gmail.com>


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 04/10] dt-bindings: iio: dac: use spi-peripheral-props.yaml
  2022-07-27 16:46 ` [PATCH v2 04/10] dt-bindings: iio: dac: " Krzysztof Kozlowski
@ 2022-07-30 22:43   ` Lukas Wunner
  0 siblings, 0 replies; 22+ messages in thread
From: Lukas Wunner @ 2022-07-30 22:43 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Rob Herring, Krzysztof Kozlowski, Lucas Stankus, Puranjay Mohan,
	Cosmin Tanislav, Alexandru Tachici, Marcelo Schmitt,
	Marcus Folkesson, Kent Gustavsson, Tomislav Denis,
	Oleksij Rempel, kernel, Antoniu Miclaus, Ricardo Ribalda,
	Dragos Bogdan, Jean-Baptiste Maneyrol, Lorenzo Bianconi,
	Stefan Popa, Linus Walleij, Stephan Gerhold, Mike Looijmans,
	Joachim Eastwood, Tomas Melin, Sean Nyekjaer, Beniamin Bia,
	Patrick Vasseur, Charles-Antoine Couret, Vladimir Barinov,
	Miquel Raynal, Philippe Reynes, Jacopo Mondi, Akinobu Mita,
	Alexandru Lazar, Oskar Andero, Mårten Lindahl,
	Bogdan Pricop, Angelo Compagnucci, Matt Ranostay, Dan Murphy,
	Gregory Clement, Phil Reid, Michael Welling, Robert Jones,
	Chris Coffey, Slawomir Stepien, Sankar Velliangiri, linux-iio,
	devicetree, linux-kernel, linux-fbdev

On Wed, Jul 27, 2022 at 06:46:40PM +0200, Krzysztof Kozlowski wrote:
> diff --git a/Documentation/devicetree/bindings/iio/dac/ti,dac082s085.yaml b/Documentation/devicetree/bindings/iio/dac/ti,dac082s085.yaml
> index b0157050f1ee..201b04af2b22 100644
> --- a/Documentation/devicetree/bindings/iio/dac/ti,dac082s085.yaml
> +++ b/Documentation/devicetree/bindings/iio/dac/ti,dac082s085.yaml
> @@ -33,21 +33,22 @@ properties:
>    vref-supply:
>      description: Needed to provide output scaling.
>  
> -  spi-max-frequency: true
> -
>  required:
>    - compatible
>    - reg
>    - vref-supply
>  
> -additionalProperties: false
> -
>  oneOf:
>    - required:
>        - spi-cpha
>    - required:
>        - spi-cpol
>  
> +allOf:
> +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +unevaluatedProperties: false
> +
>  examples:
>    - |
>      vref_2v5_reg: regulator-vref {

Just to double-check because I'm unsure how the allOf interacts with
the oneOf above:  The DT must specify either spi-cpha or spi-cpol
for this device, but not both.  Hopefully that's still enforced
after your change?

Thanks,

Lukas

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 00/10] dt-bindings: iio: use spi-peripheral-props.yaml
  2022-07-27 16:46 [PATCH v2 00/10] dt-bindings: iio: use spi-peripheral-props.yaml Krzysztof Kozlowski
                   ` (9 preceding siblings ...)
  2022-07-27 16:46 ` [PATCH v2 10/10] dt-bindings: iio: temperature: " Krzysztof Kozlowski
@ 2022-07-30 22:46 ` Lukas Wunner
  2022-08-01 15:45   ` Krzysztof Kozlowski
  10 siblings, 1 reply; 22+ messages in thread
From: Lukas Wunner @ 2022-07-30 22:46 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Rob Herring, Krzysztof Kozlowski, Lucas Stankus, Puranjay Mohan,
	Cosmin Tanislav, Alexandru Tachici, Marcelo Schmitt,
	Marcus Folkesson, Kent Gustavsson, Tomislav Denis,
	Oleksij Rempel, kernel, Antoniu Miclaus, Ricardo Ribalda,
	Dragos Bogdan, Jean-Baptiste Maneyrol, Lorenzo Bianconi,
	Stefan Popa, Linus Walleij, Stephan Gerhold, Mike Looijmans,
	Joachim Eastwood, Tomas Melin, Sean Nyekjaer, Beniamin Bia,
	Patrick Vasseur, Charles-Antoine Couret, Vladimir Barinov,
	Miquel Raynal, Philippe Reynes, Jacopo Mondi, Akinobu Mita,
	Alexandru Lazar, Oskar Andero, Mårten Lindahl,
	Bogdan Pricop, Angelo Compagnucci, Matt Ranostay, Dan Murphy,
	Gregory Clement, Phil Reid, Michael Welling, Robert Jones,
	Chris Coffey, Slawomir Stepien, Sankar Velliangiri, linux-iio,
	devicetree, linux-kernel, linux-fbdev

On Wed, Jul 27, 2022 at 06:46:36PM +0200, Krzysztof Kozlowski wrote:
>  78 files changed, 324 insertions(+), 249 deletions(-)

Pardon me for being dense, but what is the benefit of this series
that justifies inflating the schema definitions by a total of 75 lines?

Thanks,

Lukas

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 02/10] dt-bindings: iio: accel: use spi-peripheral-props.yaml
  2022-07-27 16:46 ` [PATCH v2 02/10] dt-bindings: iio: accel: " Krzysztof Kozlowski
@ 2022-07-31 15:49   ` Jonathan Cameron
  2022-08-03 21:29     ` Rob Herring
  0 siblings, 1 reply; 22+ messages in thread
From: Jonathan Cameron @ 2022-07-31 15:49 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Lars-Peter Clausen, Michael Hennerich, Rob Herring,
	Krzysztof Kozlowski, Lucas Stankus, Puranjay Mohan,
	Cosmin Tanislav, Alexandru Tachici, Marcelo Schmitt,
	Marcus Folkesson, Kent Gustavsson, Tomislav Denis,
	Oleksij Rempel, kernel, Antoniu Miclaus, Ricardo Ribalda,
	Dragos Bogdan, Jean-Baptiste Maneyrol, Lorenzo Bianconi,
	Stefan Popa, Linus Walleij, Stephan Gerhold, Mike Looijmans,
	Joachim Eastwood, Tomas Melin, Sean Nyekjaer, Beniamin Bia,
	Patrick Vasseur, Charles-Antoine Couret, Vladimir Barinov,
	Miquel Raynal, Philippe Reynes, Jacopo Mondi, Akinobu Mita,
	Alexandru Lazar, Oskar Andero, Mårten Lindahl,
	Bogdan Pricop, Angelo Compagnucci, Matt Ranostay, Dan Murphy,
	Gregory Clement, Phil Reid, Michael Welling, Lukas Wunner,
	Robert Jones, Chris Coffey, Slawomir Stepien, Sankar Velliangiri,
	linux-iio, devicetree, linux-kernel, linux-fbdev, broonie

On Wed, 27 Jul 2022 18:46:38 +0200
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:

> 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>
> 
> ---
> 
> I wonder if spi-3wire is device specific (not controller) and should be
> rather explicitly mentioned by device schema. Just like spi-cpol/cpha.

I think it is, but Mark is expert on this.
In general I'm waiting on Mark's opinion on the whole idea!

Thanks,

Jonathan

> ---
>  .../devicetree/bindings/iio/accel/adi,adis16201.yaml     | 7 ++++---
>  .../devicetree/bindings/iio/accel/adi,adis16240.yaml     | 7 ++++---
>  .../devicetree/bindings/iio/accel/adi,adxl313.yaml       | 9 ++++-----
>  .../devicetree/bindings/iio/accel/adi,adxl345.yaml       | 7 ++++---
>  .../devicetree/bindings/iio/accel/adi,adxl355.yaml       | 7 ++++---
>  .../devicetree/bindings/iio/accel/adi,adxl367.yaml       | 7 ++++---
>  .../devicetree/bindings/iio/accel/adi,adxl372.yaml       | 7 ++++---
>  .../devicetree/bindings/iio/accel/bosch,bma220.yaml      | 7 ++++---
>  .../devicetree/bindings/iio/accel/bosch,bma255.yaml      | 5 ++++-
>  .../devicetree/bindings/iio/accel/bosch,bmi088.yaml      | 7 ++++---
>  .../devicetree/bindings/iio/accel/fsl,mma7455.yaml       | 7 ++++---
>  .../devicetree/bindings/iio/accel/kionix,kxsd9.yaml      | 7 ++++---
>  .../devicetree/bindings/iio/accel/murata,sca3300.yaml    | 5 ++++-
>  .../devicetree/bindings/iio/accel/nxp,fxls8962af.yaml    | 7 ++++---
>  14 files changed, 56 insertions(+), 40 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adis16201.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adis16201.yaml
> index 6f8f8a6258fe..7332442e5661 100644
> --- a/Documentation/devicetree/bindings/iio/accel/adi,adis16201.yaml
> +++ b/Documentation/devicetree/bindings/iio/accel/adi,adis16201.yaml
> @@ -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:
>    - |
> diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adis16240.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adis16240.yaml
> index 8d829ef878bc..f6f97164c2ca 100644
> --- a/Documentation/devicetree/bindings/iio/accel/adi,adis16240.yaml
> +++ b/Documentation/devicetree/bindings/iio/accel/adi,adis16240.yaml
> @@ -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:
>    - |
> diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adxl313.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adxl313.yaml
> index d6afc1b8c272..7c1bc7810528 100644
> --- a/Documentation/devicetree/bindings/iio/accel/adi,adxl313.yaml
> +++ b/Documentation/devicetree/bindings/iio/accel/adi,adxl313.yaml
> @@ -22,10 +22,6 @@ properties:
>    reg:
>      maxItems: 1
>  
> -  spi-3wire: true
> -
> -  spi-max-frequency: true
> -
>    vs-supply:
>      description: Regulator that supplies power to the accelerometer
>  
> @@ -48,7 +44,10 @@ required:
>    - compatible
>    - reg
>  
> -additionalProperties: false
> +allOf:
> +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +unevaluatedProperties: false
>  
>  examples:
>    - |
> diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
> index 9bb039e2f533..346abfb13a3a 100644
> --- a/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
> +++ b/Documentation/devicetree/bindings/iio/accel/adi,adxl345.yaml
> @@ -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:
>    - |
> diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adxl355.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adxl355.yaml
> index ba54d6998f2e..14b487088ab4 100644
> --- a/Documentation/devicetree/bindings/iio/accel/adi,adxl355.yaml
> +++ b/Documentation/devicetree/bindings/iio/accel/adi,adxl355.yaml
> @@ -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:
>    - |
> diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adxl367.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adxl367.yaml
> index d259e796c1d6..f10d98d34cb8 100644
> --- a/Documentation/devicetree/bindings/iio/accel/adi,adxl367.yaml
> +++ b/Documentation/devicetree/bindings/iio/accel/adi,adxl367.yaml
> @@ -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:
>    - |
> diff --git a/Documentation/devicetree/bindings/iio/accel/adi,adxl372.yaml b/Documentation/devicetree/bindings/iio/accel/adi,adxl372.yaml
> index 38b59b6454ce..73a5c8f814cc 100644
> --- a/Documentation/devicetree/bindings/iio/accel/adi,adxl372.yaml
> +++ b/Documentation/devicetree/bindings/iio/accel/adi,adxl372.yaml
> @@ -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:
>    - |
> diff --git a/Documentation/devicetree/bindings/iio/accel/bosch,bma220.yaml b/Documentation/devicetree/bindings/iio/accel/bosch,bma220.yaml
> index 942b23ad0712..5dd06f5905b4 100644
> --- a/Documentation/devicetree/bindings/iio/accel/bosch,bma220.yaml
> +++ b/Documentation/devicetree/bindings/iio/accel/bosch,bma220.yaml
> @@ -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:
>    - |
> diff --git a/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml b/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml
> index 478e75ae0885..457a709b583c 100644
> --- a/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml
> +++ b/Documentation/devicetree/bindings/iio/accel/bosch,bma255.yaml
> @@ -72,7 +72,10 @@ required:
>    - compatible
>    - reg
>  
> -additionalProperties: false
> +allOf:
> +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +unevaluatedProperties: false
>  
>  examples:
>    - |
> diff --git a/Documentation/devicetree/bindings/iio/accel/bosch,bmi088.yaml b/Documentation/devicetree/bindings/iio/accel/bosch,bmi088.yaml
> index 272eb48eef5a..3cb82576d758 100644
> --- a/Documentation/devicetree/bindings/iio/accel/bosch,bmi088.yaml
> +++ b/Documentation/devicetree/bindings/iio/accel/bosch,bmi088.yaml
> @@ -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:
>    - |
> diff --git a/Documentation/devicetree/bindings/iio/accel/fsl,mma7455.yaml b/Documentation/devicetree/bindings/iio/accel/fsl,mma7455.yaml
> index 7c8f8bdc2333..589ca8178f4a 100644
> --- a/Documentation/devicetree/bindings/iio/accel/fsl,mma7455.yaml
> +++ b/Documentation/devicetree/bindings/iio/accel/fsl,mma7455.yaml
> @@ -40,13 +40,14 @@ properties:
>          - "INT1"
>          - "INT2"
>  
> -  spi-max-frequency: true
> -
>  required:
>    - compatible
>    - reg
>  
> -additionalProperties: false
> +allOf:
> +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +unevaluatedProperties: false
>  
>  examples:
>    - |
> diff --git a/Documentation/devicetree/bindings/iio/accel/kionix,kxsd9.yaml b/Documentation/devicetree/bindings/iio/accel/kionix,kxsd9.yaml
> index 390b87242fcb..f64d99b35492 100644
> --- a/Documentation/devicetree/bindings/iio/accel/kionix,kxsd9.yaml
> +++ b/Documentation/devicetree/bindings/iio/accel/kionix,kxsd9.yaml
> @@ -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:
>    - |
> diff --git a/Documentation/devicetree/bindings/iio/accel/murata,sca3300.yaml b/Documentation/devicetree/bindings/iio/accel/murata,sca3300.yaml
> index f6e2a16a710b..00c990caa1e4 100644
> --- a/Documentation/devicetree/bindings/iio/accel/murata,sca3300.yaml
> +++ b/Documentation/devicetree/bindings/iio/accel/murata,sca3300.yaml
> @@ -29,7 +29,10 @@ required:
>    - compatible
>    - reg
>  
> -additionalProperties: false
> +allOf:
> +  - $ref: /schemas/spi/spi-peripheral-props.yaml#
> +
> +unevaluatedProperties: false
>  
>  examples:
>    - |
> diff --git a/Documentation/devicetree/bindings/iio/accel/nxp,fxls8962af.yaml b/Documentation/devicetree/bindings/iio/accel/nxp,fxls8962af.yaml
> index ad529ab2c6e2..65ce8ea14b52 100644
> --- a/Documentation/devicetree/bindings/iio/accel/nxp,fxls8962af.yaml
> +++ b/Documentation/devicetree/bindings/iio/accel/nxp,fxls8962af.yaml
> @@ -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:
>    - |


^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 00/10] dt-bindings: iio: use spi-peripheral-props.yaml
  2022-07-30 22:46 ` [PATCH v2 00/10] dt-bindings: iio: " Lukas Wunner
@ 2022-08-01 15:45   ` Krzysztof Kozlowski
  2022-08-01 16:04     ` Lukas Wunner
  0 siblings, 1 reply; 22+ messages in thread
From: Krzysztof Kozlowski @ 2022-08-01 15:45 UTC (permalink / raw)
  To: Lukas Wunner
  Cc: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Rob Herring, Krzysztof Kozlowski, Lucas Stankus, Puranjay Mohan,
	Cosmin Tanislav, Alexandru Tachici, Marcelo Schmitt,
	Marcus Folkesson, Kent Gustavsson, Tomislav Denis,
	Oleksij Rempel, kernel, Antoniu Miclaus, Ricardo Ribalda,
	Dragos Bogdan, Jean-Baptiste Maneyrol, Lorenzo Bianconi,
	Stefan Popa, Linus Walleij, Stephan Gerhold, Mike Looijmans,
	Joachim Eastwood, Tomas Melin, Sean Nyekjaer, Beniamin Bia,
	Patrick Vasseur, Charles-Antoine Couret, Vladimir Barinov,
	Miquel Raynal, Philippe Reynes, Jacopo Mondi, Akinobu Mita,
	Alexandru Lazar, Oskar Andero, Mårten Lindahl,
	Bogdan Pricop, Angelo Compagnucci, Matt Ranostay, Dan Murphy,
	Gregory Clement, Phil Reid, Michael Welling, Robert Jones,
	Chris Coffey, Slawomir Stepien, Sankar Velliangiri, linux-iio,
	devicetree, linux-kernel, linux-fbdev

On 31/07/2022 00:46, Lukas Wunner wrote:
> On Wed, Jul 27, 2022 at 06:46:36PM +0200, Krzysztof Kozlowski wrote:
>>  78 files changed, 324 insertions(+), 249 deletions(-)
> 
> Pardon me for being dense, but what is the benefit of this series
> that justifies inflating the schema definitions by a total of 75 lines?

The commits were explaining rationale, so let me bring it here. The
benefits are:
This allows using all properties typical for SPI-connected devices, even
these which device bindings author did not tried yet.

Also, what I did not mention in commit msg, this makes sure, that
spi-xxx properties have a type, which is validated by
spi-peripheral-props.yaml. Otherwise, when someone puts bogus data as
spi-max-frequency (e.g. phandle) and checks only with that device
schema, no errors are reported.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 00/10] dt-bindings: iio: use spi-peripheral-props.yaml
  2022-08-01 15:45   ` Krzysztof Kozlowski
@ 2022-08-01 16:04     ` Lukas Wunner
  2022-08-02  8:00       ` Krzysztof Kozlowski
  2022-08-03 21:40       ` Rob Herring
  0 siblings, 2 replies; 22+ messages in thread
From: Lukas Wunner @ 2022-08-01 16:04 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Rob Herring, Krzysztof Kozlowski, Lucas Stankus, Puranjay Mohan,
	Cosmin Tanislav, Alexandru Tachici, Marcelo Schmitt,
	Marcus Folkesson, Kent Gustavsson, Tomislav Denis,
	Oleksij Rempel, kernel, Antoniu Miclaus, Ricardo Ribalda,
	Dragos Bogdan, Jean-Baptiste Maneyrol, Lorenzo Bianconi,
	Stefan Popa, Linus Walleij, Stephan Gerhold, Mike Looijmans,
	Joachim Eastwood, Tomas Melin, Sean Nyekjaer, Beniamin Bia,
	Patrick Vasseur, Charles-Antoine Couret, Vladimir Barinov,
	Miquel Raynal, Philippe Reynes, Jacopo Mondi, Akinobu Mita,
	Alexandru Lazar, Oskar Andero, Mårten Lindahl,
	Bogdan Pricop, Angelo Compagnucci, Matt Ranostay, Dan Murphy,
	Gregory Clement, Phil Reid, Michael Welling, Robert Jones,
	Chris Coffey, Slawomir Stepien, Sankar Velliangiri, linux-iio,
	devicetree, linux-kernel, linux-fbdev

On Mon, Aug 01, 2022 at 05:45:07PM +0200, Krzysztof Kozlowski wrote:
> On 31/07/2022 00:46, Lukas Wunner wrote:
> > On Wed, Jul 27, 2022 at 06:46:36PM +0200, Krzysztof Kozlowski wrote:
> >>  78 files changed, 324 insertions(+), 249 deletions(-)
> > 
> > Pardon me for being dense, but what is the benefit of this series
> > that justifies inflating the schema definitions by a total of 75 lines?
> 
> The commits were explaining rationale, so let me bring it here. The
> benefits are:
> This allows using all properties typical for SPI-connected devices, even
> these which device bindings author did not tried yet.

How do you know these untested properties work with the devices to which
you're adding them?

Thanks,

Lukas

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 00/10] dt-bindings: iio: use spi-peripheral-props.yaml
  2022-08-01 16:04     ` Lukas Wunner
@ 2022-08-02  8:00       ` Krzysztof Kozlowski
  2022-08-03 21:40       ` Rob Herring
  1 sibling, 0 replies; 22+ messages in thread
From: Krzysztof Kozlowski @ 2022-08-02  8:00 UTC (permalink / raw)
  To: Lukas Wunner
  Cc: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
	Rob Herring, Krzysztof Kozlowski, Lucas Stankus, Puranjay Mohan,
	Cosmin Tanislav, Alexandru Tachici, Marcelo Schmitt,
	Marcus Folkesson, Kent Gustavsson, Tomislav Denis,
	Oleksij Rempel, kernel, Antoniu Miclaus, Ricardo Ribalda,
	Dragos Bogdan, Jean-Baptiste Maneyrol, Lorenzo Bianconi,
	Stefan Popa, Linus Walleij, Stephan Gerhold, Mike Looijmans,
	Joachim Eastwood, Tomas Melin, Sean Nyekjaer, Beniamin Bia,
	Patrick Vasseur, Charles-Antoine Couret, Vladimir Barinov,
	Miquel Raynal, Philippe Reynes, Jacopo Mondi, Akinobu Mita,
	Alexandru Lazar, Oskar Andero, Mårten Lindahl,
	Bogdan Pricop, Angelo Compagnucci, Matt Ranostay, Dan Murphy,
	Gregory Clement, Phil Reid, Michael Welling, Robert Jones,
	Chris Coffey, Slawomir Stepien, Sankar Velliangiri, linux-iio,
	devicetree, linux-kernel, linux-fbdev

On 01/08/2022 18:04, Lukas Wunner wrote:
> On Mon, Aug 01, 2022 at 05:45:07PM +0200, Krzysztof Kozlowski wrote:
>> On 31/07/2022 00:46, Lukas Wunner wrote:
>>> On Wed, Jul 27, 2022 at 06:46:36PM +0200, Krzysztof Kozlowski wrote:
>>>>  78 files changed, 324 insertions(+), 249 deletions(-)
>>>
>>> Pardon me for being dense, but what is the benefit of this series
>>> that justifies inflating the schema definitions by a total of 75 lines?
>>
>> The commits were explaining rationale, so let me bring it here. The
>> benefits are:
>> This allows using all properties typical for SPI-connected devices, even
>> these which device bindings author did not tried yet.
> 
> How do you know these untested properties work with the devices to which
> you're adding them?

These properties should be device independent and instead
controller-dependent. At least some of them (that's why CPHA/CPOL was
moved away and maybe the same we need to do with spi-3wire, spi-cs-high,
spi-lsb-first).

My approach here is no different than other subsystems. Take a look at
regulator - we allow all regulator.yaml properties, even though several
are not applicable (e.g. current for voltage regulators) and for sure no
tested.

Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 02/10] dt-bindings: iio: accel: use spi-peripheral-props.yaml
  2022-07-31 15:49   ` Jonathan Cameron
@ 2022-08-03 21:29     ` Rob Herring
  2022-08-04  7:27       ` Krzysztof Kozlowski
  0 siblings, 1 reply; 22+ messages in thread
From: Rob Herring @ 2022-08-03 21:29 UTC (permalink / raw)
  To: Jonathan Cameron
  Cc: Krzysztof Kozlowski, Lars-Peter Clausen, Michael Hennerich,
	Krzysztof Kozlowski, Lucas Stankus, Puranjay Mohan,
	Cosmin Tanislav, Alexandru Tachici, Marcelo Schmitt,
	Marcus Folkesson, Kent Gustavsson, Tomislav Denis,
	Oleksij Rempel, kernel, Antoniu Miclaus, Ricardo Ribalda,
	Dragos Bogdan, Jean-Baptiste Maneyrol, Lorenzo Bianconi,
	Stefan Popa, Linus Walleij, Stephan Gerhold, Mike Looijmans,
	Joachim Eastwood, Tomas Melin, Sean Nyekjaer, Beniamin Bia,
	Patrick Vasseur, Charles-Antoine Couret, Vladimir Barinov,
	Miquel Raynal, Philippe Reynes, Jacopo Mondi, Akinobu Mita,
	Alexandru Lazar, Oskar Andero, Mårten Lindahl,
	Bogdan Pricop, Angelo Compagnucci, Matt Ranostay, Dan Murphy,
	Gregory Clement, Phil Reid, Michael Welling, Lukas Wunner,
	Robert Jones, Chris Coffey, Slawomir Stepien, Sankar Velliangiri,
	linux-iio, devicetree, linux-kernel, linux-fbdev, broonie

On Sun, Jul 31, 2022 at 04:49:43PM +0100, Jonathan Cameron wrote:
> On Wed, 27 Jul 2022 18:46:38 +0200
> Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:
> 
> > 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>
> > 
> > ---
> > 
> > I wonder if spi-3wire is device specific (not controller) and should be
> > rather explicitly mentioned by device schema. Just like spi-cpol/cpha.
> 
> I think it is, but Mark is expert on this.

I would say yes as it's the device with a single data line.

> In general I'm waiting on Mark's opinion on the whole idea!

The prerequisite changes (except for spi-3-wire) are already queued up 
by Mark as are changes for other subsystems.

Rob

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 00/10] dt-bindings: iio: use spi-peripheral-props.yaml
  2022-08-01 16:04     ` Lukas Wunner
  2022-08-02  8:00       ` Krzysztof Kozlowski
@ 2022-08-03 21:40       ` Rob Herring
  1 sibling, 0 replies; 22+ messages in thread
From: Rob Herring @ 2022-08-03 21:40 UTC (permalink / raw)
  To: Lukas Wunner
  Cc: Krzysztof Kozlowski, Lars-Peter Clausen, Michael Hennerich,
	Jonathan Cameron, Krzysztof Kozlowski, Lucas Stankus,
	Puranjay Mohan, Cosmin Tanislav, Alexandru Tachici,
	Marcelo Schmitt, Marcus Folkesson, Kent Gustavsson,
	Tomislav Denis, Oleksij Rempel, kernel, Antoniu Miclaus,
	Ricardo Ribalda, Dragos Bogdan, Jean-Baptiste Maneyrol,
	Lorenzo Bianconi, Stefan Popa, Linus Walleij, Stephan Gerhold,
	Mike Looijmans, Joachim Eastwood, Tomas Melin, Sean Nyekjaer,
	Beniamin Bia, Patrick Vasseur, Charles-Antoine Couret,
	Vladimir Barinov, Miquel Raynal, Philippe Reynes, Jacopo Mondi,
	Akinobu Mita, Alexandru Lazar, Oskar Andero, Mårten Lindahl,
	Bogdan Pricop, Angelo Compagnucci, Matt Ranostay, Dan Murphy,
	Gregory Clement, Phil Reid, Michael Welling, Robert Jones,
	Chris Coffey, Slawomir Stepien, Sankar Velliangiri, linux-iio,
	devicetree, linux-kernel, linux-fbdev

On Mon, Aug 01, 2022 at 06:04:10PM +0200, Lukas Wunner wrote:
> On Mon, Aug 01, 2022 at 05:45:07PM +0200, Krzysztof Kozlowski wrote:
> > On 31/07/2022 00:46, Lukas Wunner wrote:
> > > On Wed, Jul 27, 2022 at 06:46:36PM +0200, Krzysztof Kozlowski wrote:
> > >>  78 files changed, 324 insertions(+), 249 deletions(-)
> > > 
> > > Pardon me for being dense, but what is the benefit of this series
> > > that justifies inflating the schema definitions by a total of 75 lines?
> > 
> > The commits were explaining rationale, so let me bring it here. The
> > benefits are:
> > This allows using all properties typical for SPI-connected devices, even
> > these which device bindings author did not tried yet.
> 
> How do you know these untested properties work with the devices to which
> you're adding them?

How do we know anything DT works? We don't without testing on h/w. 
That's not what the schemas provide.

The spi-peripheral-props.yaml reference is needed in order to allow 
controller specific timing properties and to prevent random 
other undocumented properties from being present. There is not another 
way to do both of those.

Do I wish we didn't have these controller specific timing parameters, 
yes! But that ship has sailed.

Rob

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 02/10] dt-bindings: iio: accel: use spi-peripheral-props.yaml
  2022-08-03 21:29     ` Rob Herring
@ 2022-08-04  7:27       ` Krzysztof Kozlowski
  2022-08-06 17:31         ` Jonathan Cameron
  0 siblings, 1 reply; 22+ messages in thread
From: Krzysztof Kozlowski @ 2022-08-04  7:27 UTC (permalink / raw)
  To: Rob Herring, Jonathan Cameron
  Cc: Lars-Peter Clausen, Michael Hennerich, Krzysztof Kozlowski,
	Lucas Stankus, Puranjay Mohan, Cosmin Tanislav,
	Alexandru Tachici, Marcelo Schmitt, Marcus Folkesson,
	Kent Gustavsson, Tomislav Denis, Oleksij Rempel, kernel,
	Antoniu Miclaus, Ricardo Ribalda, Dragos Bogdan,
	Jean-Baptiste Maneyrol, Lorenzo Bianconi, Stefan Popa,
	Linus Walleij, Stephan Gerhold, Mike Looijmans, Joachim Eastwood,
	Tomas Melin, Sean Nyekjaer, Beniamin Bia, Patrick Vasseur,
	Charles-Antoine Couret, Vladimir Barinov, Miquel Raynal,
	Philippe Reynes, Jacopo Mondi, Akinobu Mita, Alexandru Lazar,
	Oskar Andero, Mårten Lindahl, Bogdan Pricop,
	Angelo Compagnucci, Matt Ranostay, Dan Murphy, Gregory Clement,
	Phil Reid, Michael Welling, Lukas Wunner, Robert Jones,
	Chris Coffey, Slawomir Stepien, Sankar Velliangiri, linux-iio,
	devicetree, linux-kernel, linux-fbdev, broonie

On 03/08/2022 23:29, Rob Herring wrote:
>>> I wonder if spi-3wire is device specific (not controller) and should be
>>> rather explicitly mentioned by device schema. Just like spi-cpol/cpha.
>>
>> I think it is, but Mark is expert on this.
> 
> I would say yes as it's the device with a single data line.

I will move it to device schema, just like cpol/cpha, and send a v3.
After the merge window.

> 
>> In general I'm waiting on Mark's opinion on the whole idea!
> 
> The prerequisite changes (except for spi-3-wire) are already queued up 
> by Mark as are changes for other subsystems.


Best regards,
Krzysztof

^ permalink raw reply	[flat|nested] 22+ messages in thread

* Re: [PATCH v2 02/10] dt-bindings: iio: accel: use spi-peripheral-props.yaml
  2022-08-04  7:27       ` Krzysztof Kozlowski
@ 2022-08-06 17:31         ` Jonathan Cameron
  0 siblings, 0 replies; 22+ messages in thread
From: Jonathan Cameron @ 2022-08-06 17:31 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Rob Herring, Lars-Peter Clausen, Michael Hennerich,
	Krzysztof Kozlowski, Lucas Stankus, Puranjay Mohan,
	Cosmin Tanislav, Alexandru Tachici, Marcelo Schmitt,
	Marcus Folkesson, Kent Gustavsson, Tomislav Denis,
	Oleksij Rempel, kernel, Antoniu Miclaus, Ricardo Ribalda,
	Dragos Bogdan, Jean-Baptiste Maneyrol, Lorenzo Bianconi,
	Stefan Popa, Linus Walleij, Stephan Gerhold, Mike Looijmans,
	Joachim Eastwood, Tomas Melin, Sean Nyekjaer, Beniamin Bia,
	Patrick Vasseur, Charles-Antoine Couret, Vladimir Barinov,
	Miquel Raynal, Philippe Reynes, Jacopo Mondi, Akinobu Mita,
	Alexandru Lazar, Oskar Andero, Mårten Lindahl,
	Bogdan Pricop, Angelo Compagnucci, Matt Ranostay, Dan Murphy,
	Gregory Clement, Phil Reid, Michael Welling, Lukas Wunner,
	Robert Jones, Chris Coffey, Slawomir Stepien, Sankar Velliangiri,
	linux-iio, devicetree, linux-kernel, linux-fbdev, broonie

On Thu, 4 Aug 2022 09:27:37 +0200
Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> wrote:

> On 03/08/2022 23:29, Rob Herring wrote:
> >>> I wonder if spi-3wire is device specific (not controller) and should be
> >>> rather explicitly mentioned by device schema. Just like spi-cpol/cpha.  
> >>
> >> I think it is, but Mark is expert on this.  
> > 
> > I would say yes as it's the device with a single data line.  
> 
> I will move it to device schema, just like cpol/cpha, and send a v3.
> After the merge window.
Works for me. I'll wait for v3 then.



> 
> >   
> >> In general I'm waiting on Mark's opinion on the whole idea!  
> > 
> > The prerequisite changes (except for spi-3-wire) are already queued up 
> > by Mark as are changes for other subsystems.  

Ah. Got it.

Thanks for driving this through.

Jonathan
> 
> 
> Best regards,
> Krzysztof


^ permalink raw reply	[flat|nested] 22+ messages in thread

end of thread, other threads:[~2022-08-06 17:21 UTC | newest]

Thread overview: 22+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-27 16:46 [PATCH v2 00/10] dt-bindings: iio: use spi-peripheral-props.yaml Krzysztof Kozlowski
2022-07-27 16:46 ` [PATCH v2 01/10] dt-bindings: iio: adc: " Krzysztof Kozlowski
2022-07-27 16:56   ` Marcus Folkesson
2022-07-27 16:46 ` [PATCH v2 02/10] dt-bindings: iio: accel: " Krzysztof Kozlowski
2022-07-31 15:49   ` Jonathan Cameron
2022-08-03 21:29     ` Rob Herring
2022-08-04  7:27       ` Krzysztof Kozlowski
2022-08-06 17:31         ` Jonathan Cameron
2022-07-27 16:46 ` [PATCH v2 03/10] dt-bindings: iio: amplifiers: adi,ada4250: " Krzysztof Kozlowski
2022-07-27 16:46 ` [PATCH v2 04/10] dt-bindings: iio: dac: " Krzysztof Kozlowski
2022-07-30 22:43   ` Lukas Wunner
2022-07-27 16:46 ` [PATCH v2 05/10] dt-bindings: iio: frequency: adf4371: " Krzysztof Kozlowski
2022-07-27 16:46 ` [PATCH v2 06/10] dt-bindings: iio: health: ti,afe4403: " Krzysztof Kozlowski
2022-07-27 16:46 ` [PATCH v2 07/10] dt-bindings: iio: imu: " Krzysztof Kozlowski
2022-07-27 16:46 ` [PATCH v2 08/10] dt-bindings: iio: potentiometer: " Krzysztof Kozlowski
2022-07-27 16:46 ` [PATCH v2 09/10] dt-bindings: iio: samsung,sensorhub-rinato: " Krzysztof Kozlowski
2022-07-27 16:46 ` [PATCH v2 10/10] dt-bindings: iio: temperature: " Krzysztof Kozlowski
2022-07-30 22:46 ` [PATCH v2 00/10] dt-bindings: iio: " Lukas Wunner
2022-08-01 15:45   ` Krzysztof Kozlowski
2022-08-01 16:04     ` Lukas Wunner
2022-08-02  8:00       ` Krzysztof Kozlowski
2022-08-03 21:40       ` Rob Herring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.