[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220727164646.387541-3-krzysztof.kozlowski@linaro.org>
Date: Wed, 27 Jul 2022 18:46:38 +0200
From: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
To: Lars-Peter Clausen <lars@...afoo.de>,
Michael Hennerich <Michael.Hennerich@...log.com>,
Jonathan Cameron <jic23@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Lucas Stankus <lucas.p.stankus@...il.com>,
Puranjay Mohan <puranjay12@...il.com>,
Cosmin Tanislav <cosmin.tanislav@...log.com>,
Alexandru Tachici <alexandru.tachici@...log.com>,
Marcelo Schmitt <marcelo.schmitt1@...il.com>,
Marcus Folkesson <marcus.folkesson@...il.com>,
Kent Gustavsson <kent@...oris.se>,
Tomislav Denis <tomislav.denis@....com>,
Oleksij Rempel <linux@...pel-privat.de>, kernel@...gutronix.de,
Antoniu Miclaus <antoniu.miclaus@...log.com>,
Ricardo Ribalda <ribalda@...nel.org>,
Dragos Bogdan <dragos.bogdan@...log.com>,
Jean-Baptiste Maneyrol <jmaneyrol@...ensense.com>,
Lorenzo Bianconi <lorenzo@...nel.org>,
Stefan Popa <stefan.popa@...log.com>,
Linus Walleij <linus.walleij@...aro.org>,
Stephan Gerhold <stephan@...hold.net>,
Mike Looijmans <mike.looijmans@...ic.nl>,
Joachim Eastwood <manabian@...il.com>,
Tomas Melin <tomas.melin@...sala.com>,
Sean Nyekjaer <sean@...nix.com>,
Beniamin Bia <beniamin.bia@...log.com>,
Patrick Vasseur <patrick.vasseur@....fr>,
Charles-Antoine Couret <charles-antoine.couret@...ensium.com>,
Vladimir Barinov <vladimir.barinov@...entembedded.com>,
Miquel Raynal <miquel.raynal@...tlin.com>,
Philippe Reynes <tremyfr@...oo.fr>,
Jacopo Mondi <jacopo@...ndi.org>,
Akinobu Mita <akinobu.mita@...il.com>,
Alexandru Lazar <alazar@...rtmail.com>,
Oskar Andero <oskar.andero@...il.com>,
MÃ¥rten Lindahl <martenli@...s.com>,
Bogdan Pricop <bogdan.pricop@...tex.com>,
Angelo Compagnucci <angelo.compagnucci@...il.com>,
Matt Ranostay <matt.ranostay@...sulko.com>,
Dan Murphy <dmurphy@...com>,
Gregory Clement <gregory.clement@...tlin.com>,
Phil Reid <preid@...ctromag.com.au>,
Michael Welling <mwelling@...e.org>,
Lukas Wunner <lukas@...ner.de>,
Robert Jones <rjones@...eworks.com>,
Chris Coffey <cmc@...blebit.net>,
Slawomir Stepien <sst@...zta.fm>,
Sankar Velliangiri <navin@...umiz.com>,
linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-fbdev@...r.kernel.org
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.org>
Subject: [PATCH v2 02/10] dt-bindings: iio: accel: use spi-peripheral-props.yaml
Instead of listing directly properties typical for SPI peripherals,
reference the spi-peripheral-props.yaml schema. This allows using all
properties typical for SPI-connected devices, even these which device
bindings author did not tried yet.
Remove the spi-* properties which now come via spi-peripheral-props.yaml
schema, except for the cases when device schema adds some constraints
like maximum frequency.
While changing additionalProperties->unevaluatedProperties, put it in
typical place, just before example DTS.
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@...aro.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
Powered by blists - more mailing lists