[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220727164646.387541-8-krzysztof.kozlowski@linaro.org>
Date: Wed, 27 Jul 2022 18:46:43 +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 07/10] dt-bindings: iio: imu: 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>
---
.../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
Powered by blists - more mailing lists