[PATCH v3] dt-bindings: iio: adc: add documentation for adi,ad7816
From: wrmfwv
Date: Sun Oct 18 2026 - 07:02:44 EST
From: Tenglong Guo <admin@xxxxxxxxxxxx>
Add a YAML binding document for the AD7816 family of ADCs.
This fixes the checkpatch.pl warning about un-documented
DT compatible strings in the staging driver.
Reviewed-by: Sashiko AI <sashiko-bot@xxxxxxxxxx>
Signed-off-by: Tenglong Guo <admin@xxxxxxxxxxxx>
---
.../bindings/iio/adc/adi,ad7816.yaml | 83 +++++++++++++++++++
1 file changed, 83 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 000000000000..a969e046883a
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7816.yaml
@@ -0,0 +1,83 @@
+# 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/AD7817/AD7818 ADC
+
+maintainers:
+ - Tenglong Guo <admin@xxxxxxxxxxxx>
+
+description: |
+ The AD7816/AD7817/AD7818 are 10-bit ADCs with on-chip temperature sensors.
+ They use a SPI interface for communication.
+
+properties:
+ compatible:
+ enum:
+ - adi,ad7816
+ - adi,ad7817
+ - adi,ad7818
+
+ reg:
+ maxItems: 1
+
+ rdwr-gpios:
+ maxItems: 1
+ description: GPIO connected to the RD/WR pin.
+
+ convert-gpios:
+ maxItems: 1
+ description: GPIO connected to the CONVST pin.
+
+ busy-gpios:
+ maxItems: 1
+ description: GPIO connected to the BUSY pin. Required for AD7816 and AD7817.
+
+ interrupts:
+ maxItems: 1
+ description: Optional interrupt for over-temperature indication.
+
+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>;
+ rdwr-gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
+ convert-gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
+ busy-gpios = <&gpio0 3 GPIO_ACTIVE_HIGH>;
+ interrupts-extended = <&gpio0 4 IRQ_TYPE_LEVEL_LOW>;
+ };
+ };
+...
--
2.25.1