From: Taha Narimani <tahanarimani3443@gmail.com>
To: "Lars-Peter Clausen" <lars@metafoo.de>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Taha Narimani" <tahanarimani3443@gmail.com>,
linux-iio@vger.kernel.org (open list:IIO SUBSYSTEM AND DRIVERS),
devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND
FLATTENED DEVICE TREE BINDINGS),
linux-kernel@vger.kernel.org (open list)
Cc: linux-iio@vger.kernel.org (open list:IIO SUBSYSTEM AND DRIVERS),
devicetree@vger.kernel.org (open list:OPEN FIRMWARE AND
FLATTENED DEVICE TREE BINDINGS),
linux-kernel@vger.kernel.org (open list)
Subject: [PATCH] dt-bindings: iio: adc: Add schema for AD7816/7/8 digital temperature sensor
Date: Sat, 30 May 2026 13:53:00 +0000 [thread overview]
Message-ID: <20260530135302.54688-1-tahanarimani3443@gmail.com> (raw)
In-Reply-To: <20260530133126.54460-1-tahanarimani3443@gmail.com>
Document the Analog Devices AD7816, AD7817, and AD7818 digital
temperature sensor and ADC bindings in YAML format.
This resolves the checkpatch.pl warnings regarding undocumented DT
compatible strings for 'adi,ad7816', 'adi,ad7817', and 'adi,ad7818'.
Signed-off-by: Taha Narimani <tahanarimani3443@gmail.com>
---
v2: Added conditional schema constraints for busy-gpios as suggested by Sashiko AI.
---
.../bindings/iio/adc/adi,ad7816.yaml | 87 +++++++++++++++++++
1 file changed, 87 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7816.yaml
diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7816.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7816.yaml
new file mode 100644
index 0000000..74008c1
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7816.yaml
@@ -0,0 +1,87 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/adi,ad7816.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices AD7816/7/8 digital temperature sensor and ADC
+
+maintainers:
+ - Taha Narimani <tahanarimani3443@gmail.com>
+
+description: |
+ Analog Devices AD7816, AD7817, and AD7818 10-Bit temperature sensor and ADC.
+ The device communicates via an SPI interface.
+
+properties:
+ compatible:
+ enum:
+ - adi,ad7816
+ - adi,ad7817
+ - adi,ad7818
+
+ reg:
+ maxItems: 1
+
+ spi-max-frequency: true
+
+ rdwr-gpios:
+ maxItems: 1
+ description: GPIO connected to the RD/WR pin.
+
+ convert-gpios:
+ maxItems: 1
+ description: GPIO connected to the CONVST (Convert Start) pin.
+
+ busy-gpios:
+ maxItems: 1
+ description: GPIO connected to the BUSY pin.
+
+ interrupts:
+ maxItems: 1
+ description: OTI (Over Temperature Indicator) interrupt.
+
+required:
+ - compatible
+ - reg
+ - rdwr-gpios
+ - convert-gpios
+
+allOf:
+ - $ref: /schemas/spi/spi-peripheral-props.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - adi,ad7816
+ - adi,ad7817
+ then:
+ required:
+ - busy-gpios
+ else:
+ properties:
+ busy-gpios: false
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ spi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ adc@0 {
+ compatible = "adi,ad7816";
+ reg = <0>;
+ spi-max-frequency = <1000000>;
+ rdwr-gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
+ convert-gpios = <&gpio 6 GPIO_ACTIVE_HIGH>;
+ busy-gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
+ interrupts = <20 IRQ_TYPE_LEVEL_LOW>;
+ interrupt-parent = <&gpio>;
+ };
+ };
--
2.53.0
next prev parent reply other threads:[~2026-05-30 10:58 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-30 13:31 Taha Narimani
2026-05-30 13:53 ` Taha Narimani [this message]
2026-05-30 14:58 ` Jonathan Cameron
2026-05-30 23:11 ` Conor Dooley
2026-05-31 8:53 ` 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=20260530135302.54688-1-tahanarimani3443@gmail.com \
--to=tahanarimani3443@gmail.com \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
/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
all inboxes | Powered by JetHome®