From: Guillaume Stols <gstols@baylibre.com>
To: Lars-Peter Clausen <lars@metafoo.de>,
Michael Hennerich <Michael.Hennerich@analog.com>,
Jonathan Cameron <jic23@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Beniamin Bia <beniamin.bia@analog.com>,
Stefan Popa <stefan.popa@analog.com>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
Michael Hennerich <michael.hennerich@analog.com>,
linux-fbdev@vger.kernel.org, devicetree@vger.kernel.org,
Jonathan Cameron <Jonathan.Cameron@huawei.com>,
Guillaume Stols <gstols@baylibre.com>,
jstephan@baylibre.com, dlechner@baylibre.com
Subject: [PATCH v2 07/10] dt-bindings: iio: adc: adi,ad7606: add conditions
Date: Fri, 28 Jun 2024 14:48:25 +0000 [thread overview]
Message-ID: <20240628-cleanup-ad7606-v2-7-96e02f90256d@baylibre.com> (raw)
In-Reply-To: <20240628-cleanup-ad7606-v2-0-96e02f90256d@baylibre.com>
Since the driver supports several parts that present differences in
their layout and behaviour, it is necessary to describe the differences
from one chip to another.
Signed-off-by: Guillaume Stols <gstols@baylibre.com>
---
.../devicetree/bindings/iio/adc/adi,ad7606.yaml | 60 +++++++++++++++++++---
1 file changed, 54 insertions(+), 6 deletions(-)
diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml
index 626782ea00b3..f825a2c19a06 100644
--- a/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7606.yaml
@@ -52,10 +52,11 @@ properties:
adi,conversion-start-gpios:
description:
- Must be the device tree identifier of the CONVST pin. This logic input is
- used to initiate conversions on the analog input channels. As the line is
- active high, it should be marked GPIO_ACTIVE_HIGH.
- maxItems: 1
+ Must be the device tree identifier of the CONVST pin(s). This logic input
+ is used to initiate conversions on the analog input channels. As the line
+ is active high, it should be marked GPIO_ACTIVE_HIGH.
+ minItems: 1
+ maxItems: 2
reset-gpios:
description:
@@ -88,8 +89,11 @@ properties:
is tied to a logic high, the analog input range is ±10V for all channels.
On the AD760X, if this pin is tied to a logic low, the analog input range
is ±5V for all channels. As the line is active high, it should be marked
- GPIO_ACTIVE_HIGH.
- maxItems: 1
+ GPIO_ACTIVE_HIGH. On the AD7616, there are 2 pins, and if the 2 pins are
+ tied to a logic high, software mode is enabled, otherwise one of the 3
+ possible range values is selected.
+ minItems: 1
+ maxItems: 2
adi,oversampling-ratio-gpios:
description:
@@ -123,6 +127,50 @@ required:
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: adi,ad7616
+ then:
+ properties:
+ adi,first-data-gpios: false
+ standby-gpios: false
+ adi,range-gpios:
+ maxItems: 2
+ else:
+ properties:
+ adi,range-gpios:
+ maxItems: 1
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - adi,ad7605-4
+ - adi,ad7616
+ then:
+ properties:
+ adi,oversampling-ratio-gpios: false
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - adi,ad7605-4
+ - adi,ad7606-4
+ - adi,ad7606-6
+ - adi,ad7606-8
+ then:
+ properties:
+ adi,sw-mode: false
+ else:
+ properties:
+ adi,conversion-start-gpios:
+ maxItems: 1
+
unevaluatedProperties: false
examples:
--
2.34.1
next prev parent reply other threads:[~2024-06-28 14:48 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-28 14:48 [PATCH v2 00/10] iio: adc: ad7606: Improvements Guillaume Stols
2024-06-28 14:48 ` [PATCH v2 01/10] dt-bindings: iio: adc: adi,ad7606: add missing datasheet link Guillaume Stols
2024-06-29 15:18 ` Jonathan Cameron
2024-06-28 14:48 ` [PATCH v2 02/10] dt-bindings: iio: adc: adi,ad7606: comment and sort the compatible names Guillaume Stols
2024-06-29 15:22 ` Jonathan Cameron
2024-06-30 14:00 ` Conor Dooley
2024-06-28 14:48 ` [PATCH v2 03/10] dt-bindings: iio: adc: adi,ad7606: normalize textwidth Guillaume Stols
2024-07-01 17:13 ` Rob Herring (Arm)
2024-06-28 14:48 ` [PATCH v2 04/10] dt-bindings: iio: adc: adi,ad7606: improve descriptions Guillaume Stols
2024-06-29 15:29 ` Jonathan Cameron
2024-07-01 17:19 ` Rob Herring (Arm)
2024-06-28 14:48 ` [PATCH v2 05/10] dt-bindings: iio: adc: adi,ad7606: add supply properties Guillaume Stols
2024-06-29 15:30 ` Jonathan Cameron
2024-06-28 14:48 ` [PATCH v2 06/10] dt-bindings: iio: adc: adi,ad7606: fix example Guillaume Stols
2024-06-28 14:48 ` Guillaume Stols [this message]
2024-06-28 15:15 ` [PATCH v2 07/10] dt-bindings: iio: adc: adi,ad7606: add conditions Conor Dooley
2024-06-28 14:48 ` [PATCH v2 08/10] iio: adc: ad7606: fix oversampling gpio array Guillaume Stols
2024-06-28 14:48 ` [PATCH v2 09/10] iio: adc: ad7606: fix standby gpio state to match the documentation Guillaume Stols
2024-06-28 14:48 ` [PATCH v2 10/10] iio: adc: ad7606: switch mutexes to scoped_guard Guillaume Stols
2024-06-29 15:36 ` Jonathan Cameron
2024-06-28 15:53 ` [PATCH v2 00/10] iio: adc: ad7606: Improvements Conor Dooley
2024-06-28 15:55 ` Conor Dooley
2024-06-29 15:38 ` Jonathan Cameron
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=20240628-cleanup-ad7606-v2-7-96e02f90256d@baylibre.com \
--to=gstols@baylibre.com \
--cc=Jonathan.Cameron@huawei.com \
--cc=Michael.Hennerich@analog.com \
--cc=beniamin.bia@analog.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=jstephan@baylibre.com \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-fbdev@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=stefan.popa@analog.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).