All of lore.kernel.org
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: "Lars-Peter Clausen" <lars@metafoo.de>,
	"Michael Hennerich" <Michael.Hennerich@analog.com>,
	"Jonathan Cameron" <jic23@kernel.org>,
	"Rob Herring" <robh+dt@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Lucas Stankus" <lucas.p.stankus@gmail.com>,
	"Puranjay Mohan" <puranjay12@gmail.com>,
	"Cosmin Tanislav" <cosmin.tanislav@analog.com>,
	"Alexandru Tachici" <alexandru.tachici@analog.com>,
	"Marcelo Schmitt" <marcelo.schmitt1@gmail.com>,
	"Marcus Folkesson" <marcus.folkesson@gmail.com>,
	"Kent Gustavsson" <kent@minoris.se>,
	"Tomislav Denis" <tomislav.denis@avl.com>,
	"Oleksij Rempel" <linux@rempel-privat.de>,
	kernel@pengutronix.de,
	"Antoniu Miclaus" <antoniu.miclaus@analog.com>,
	"Ricardo Ribalda" <ribalda@kernel.org>,
	"Dragos Bogdan" <dragos.bogdan@analog.com>,
	"Jean-Baptiste Maneyrol" <jmaneyrol@invensense.com>,
	"Lorenzo Bianconi" <lorenzo@kernel.org>,
	"Stefan Popa" <stefan.popa@analog.com>,
	"Linus Walleij" <linus.walleij@linaro.org>,
	"Stephan Gerhold" <stephan@gerhold.net>,
	"Mike Looijmans" <mike.looijmans@topic.nl>,
	"Joachim Eastwood" <manabian@gmail.com>,
	"Tomas Melin" <tomas.melin@vaisala.com>,
	"Sean Nyekjaer" <sean@geanix.com>,
	"Beniamin Bia" <beniamin.bia@analog.com>,
	"Patrick Vasseur" <patrick.vasseur@c-s.fr>,
	"Charles-Antoine Couret" <charles-antoine.couret@essensium.com>,
	"Vladimir Barinov" <vladimir.barinov@cogentembedded.com>,
	"Miquel Raynal" <miquel.raynal@bootlin.com>,
	"Philippe Reynes" <tremyfr@yahoo.fr>,
	"Jacopo Mondi" <jacopo@jmondi.org>,
	"Akinobu Mita" <akinobu.mita@gmail.com>,
	"Alexandru Lazar" <alazar@startmail.com>,
	"Oskar Andero" <oskar.andero@gmail.com>,
	"Mårten Lindahl" <martenli@axis.com>,
	"Bogdan Pricop" <bogdan.pricop@emutex.com>,
	"Angelo Compagnucci" <angelo.compagnucci@gmail.com>,
	"Matt Ranostay" <matt.ranostay@konsulko.com>,
	"Dan Murphy" <dmurphy@ti.com>,
	"Gregory Clement" <gregory.clement@bootlin.com>,
	"Phil Reid" <preid@electromag.com.au>,
	"Michael Welling" <mwelling@ieee.org>,
	"Lukas Wunner" <lukas@wunner.de>,
	"Robert Jones" <rjones@gateworks.com>,
	"Chris Coffey" <cmc@babblebit.net>,
	"Slawomir Stepien" <sst@poczta.fm>,
	"Sankar Velliangiri" <navin@linumiz.com>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, linux-fbdev@vger.kernel.org
Cc: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Subject: [PATCH v2 02/10] dt-bindings: iio: accel: use spi-peripheral-props.yaml
Date: Wed, 27 Jul 2022 18:46:38 +0200	[thread overview]
Message-ID: <20220727164646.387541-3-krzysztof.kozlowski@linaro.org> (raw)
In-Reply-To: <20220727164646.387541-1-krzysztof.kozlowski@linaro.org>

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


  parent reply	other threads:[~2022-07-27 17:29 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 ` Krzysztof Kozlowski [this message]
2022-07-31 15:49   ` [PATCH v2 02/10] dt-bindings: iio: accel: " 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220727164646.387541-3-krzysztof.kozlowski@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=akinobu.mita@gmail.com \
    --cc=alazar@startmail.com \
    --cc=alexandru.tachici@analog.com \
    --cc=angelo.compagnucci@gmail.com \
    --cc=antoniu.miclaus@analog.com \
    --cc=beniamin.bia@analog.com \
    --cc=bogdan.pricop@emutex.com \
    --cc=charles-antoine.couret@essensium.com \
    --cc=cmc@babblebit.net \
    --cc=cosmin.tanislav@analog.com \
    --cc=devicetree@vger.kernel.org \
    --cc=dmurphy@ti.com \
    --cc=dragos.bogdan@analog.com \
    --cc=gregory.clement@bootlin.com \
    --cc=jacopo@jmondi.org \
    --cc=jic23@kernel.org \
    --cc=jmaneyrol@invensense.com \
    --cc=kent@minoris.se \
    --cc=kernel@pengutronix.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lars@metafoo.de \
    --cc=linus.walleij@linaro.org \
    --cc=linux-fbdev@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@rempel-privat.de \
    --cc=lorenzo@kernel.org \
    --cc=lucas.p.stankus@gmail.com \
    --cc=lukas@wunner.de \
    --cc=manabian@gmail.com \
    --cc=marcelo.schmitt1@gmail.com \
    --cc=marcus.folkesson@gmail.com \
    --cc=martenli@axis.com \
    --cc=matt.ranostay@konsulko.com \
    --cc=mike.looijmans@topic.nl \
    --cc=miquel.raynal@bootlin.com \
    --cc=mwelling@ieee.org \
    --cc=navin@linumiz.com \
    --cc=oskar.andero@gmail.com \
    --cc=patrick.vasseur@c-s.fr \
    --cc=preid@electromag.com.au \
    --cc=puranjay12@gmail.com \
    --cc=ribalda@kernel.org \
    --cc=rjones@gateworks.com \
    --cc=robh+dt@kernel.org \
    --cc=sean@geanix.com \
    --cc=sst@poczta.fm \
    --cc=stefan.popa@analog.com \
    --cc=stephan@gerhold.net \
    --cc=tomas.melin@vaisala.com \
    --cc=tomislav.denis@avl.com \
    --cc=tremyfr@yahoo.fr \
    --cc=vladimir.barinov@cogentembedded.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.