Linux-IIO Archive mirror
 help / color / mirror / Atom feed
From: Alisa-Dariana Roman <alisadariana@gmail.com>
To: michael.hennerich@analog.com, linux-iio@vger.kernel.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: lars@metafoo.de, Michael.Hennerich@analog.com, jic23@kernel.org,
	robh@kernel.org, krzysztof.kozlowski+dt@linaro.org,
	conor+dt@kernel.org, lgirdwood@gmail.com, broonie@kernel.org,
	andy@kernel.org, nuno.sa@analog.com, marcelo.schmitt@analog.com,
	bigunclemax@gmail.com, dlechner@baylibre.com,
	okan.sahin@analog.com, fr0st61te@gmail.com,
	alisa.roman@analog.com, marcus.folkesson@gmail.com,
	schnelle@linux.ibm.com, liambeguin@gmail.com
Subject: [PATCH v8 4/6] dt-bindings: iio: adc: Add single-channel property
Date: Tue, 14 May 2024 15:02:20 +0300	[thread overview]
Message-ID: <20240514120222.56488-5-alisa.roman@analog.com> (raw)
In-Reply-To: <20240514120222.56488-1-alisa.roman@analog.com>

Devices that have both single-ended channels and differential channels
cause a bit of confusion when the channels are configured in the
devicetree.

Clarify difference between these two types of channels for such devices
by adding single-channel property alongside diff-channels. They should
be mutually exclusive.

Devices that have only single-ended channels can still use reg property
to reference a channel like before.

Suggested-by: Jonathan Cameron <jic23@kernel.org>
Signed-off-by: Alisa-Dariana Roman <alisa.roman@analog.com>
---
 .../devicetree/bindings/iio/adc/adc.yaml      | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/Documentation/devicetree/bindings/iio/adc/adc.yaml b/Documentation/devicetree/bindings/iio/adc/adc.yaml
index 36775f8f71df..0a77592f7388 100644
--- a/Documentation/devicetree/bindings/iio/adc/adc.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/adc.yaml
@@ -38,6 +38,14 @@ properties:
       The first value specifies the positive input pin, the second
       specifies the negative input pin.
 
+  single-channel:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description:
+      When devices combine single-ended and differential channels, allow the
+      channel for a single element to be specified, independent of reg (as for
+      differential channels). If this and diff-channels are not present reg
+      shall be used instead.
+
   settling-time-us:
     description:
       Time between enabling the channel and first stable readings.
@@ -50,4 +58,15 @@ properties:
       device design and can interact with other characteristics such as
       settling time.
 
+anyOf:
+  - oneOf:
+      - required:
+          - reg
+          - diff-channels
+      - required:
+          - reg
+          - single-channel
+  - required:
+      - reg
+
 additionalProperties: true
-- 
2.34.1


  parent reply	other threads:[~2024-05-14 12:03 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-05-14 12:02 [PATCH v8 0/6] iio: adc: ad7192: Add AD7194 support Alisa-Dariana Roman
2024-05-14 12:02 ` [PATCH v8 1/6] iio: adc: ad7192: Use standard attribute Alisa-Dariana Roman
2024-05-19 17:45   ` Jonathan Cameron
2024-05-14 12:02 ` [PATCH v8 2/6] dt-bindings: iio: adc: ad7192: Add aincom supply Alisa-Dariana Roman
2024-05-19 17:54   ` Jonathan Cameron
2024-05-14 12:02 ` [PATCH v8 3/6] " Alisa-Dariana Roman
2024-05-14 13:13   ` Andy Shevchenko
2024-05-19 17:53     ` Jonathan Cameron
2024-05-14 12:02 ` Alisa-Dariana Roman [this message]
2024-05-14 18:57   ` [PATCH v8 4/6] dt-bindings: iio: adc: Add single-channel property Conor Dooley
2024-05-14 12:02 ` [PATCH v8 5/6] dt-bindings: iio: adc: ad7192: Add AD7194 support Alisa-Dariana Roman
2024-05-14 18:58   ` Conor Dooley
2024-05-14 12:02 ` [PATCH v8 6/6] " Alisa-Dariana Roman
2024-05-14 13:09   ` Andy Shevchenko
2024-05-19 18:03     ` Jonathan Cameron
2024-05-19 19:37       ` Alisa-Dariana Roman
2024-05-20 12:20         ` Jonathan Cameron
2024-05-20 12:28           ` Andy Shevchenko
2024-05-22  9:50             ` [PATCH] fix Alisa-Dariana Roman
2024-05-25 16:35               ` Jonathan Cameron
2024-05-14 13:14 ` [PATCH v8 0/6] iio: adc: ad7192: Add AD7194 support Andy Shevchenko

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=20240514120222.56488-5-alisa.roman@analog.com \
    --to=alisadariana@gmail.com \
    --cc=alisa.roman@analog.com \
    --cc=andy@kernel.org \
    --cc=bigunclemax@gmail.com \
    --cc=broonie@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=fr0st61te@gmail.com \
    --cc=jic23@kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=lars@metafoo.de \
    --cc=lgirdwood@gmail.com \
    --cc=liambeguin@gmail.com \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.schmitt@analog.com \
    --cc=marcus.folkesson@gmail.com \
    --cc=michael.hennerich@analog.com \
    --cc=nuno.sa@analog.com \
    --cc=okan.sahin@analog.com \
    --cc=robh@kernel.org \
    --cc=schnelle@linux.ibm.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 read-only IMAP folder(s) and NNTP newsgroup(s).