* [PATCH v3 RFC v3] dt-bindings: iio: adc: add ad7816/7/8 digital temperature sensor / ADC
@ 2026-05-30 16:59 Taha Narimani
2026-05-30 17:09 ` sashiko-bot
` (2 more replies)
0 siblings, 3 replies; 6+ messages in thread
From: Taha Narimani @ 2026-05-30 16:59 UTC (permalink / raw)
To: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
David Lechner, Nuno Sá, Andy Shevchenko, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Taha Narimani,
open list:IIO SUBSYSTEM AND DRIVERS,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list
Cc: open list:IIO SUBSYSTEM AND DRIVERS,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list
Document the Analog Devices AD7816, AD7817, and AD7818 digital
temperature sensor and ADC bindings in YAML format.
Please note that the driver for this device is currently in drivers/staging.
This patch is sent as an RFC to clean up and standardize the device tree
bindings prior to any major driver refactoring.
While reviewing the AD7816/7/8 datasheet to correctly document the properties,
it was noted that the current staging driver attempts to request a 'busy' GPIO
for both AD7816 and AD7817. However, the AD7816 is an 8-pin device and does
not possess a BUSY pin (only the 16-pin AD7817 has it). Therefore, in this
binding, busy-gpios is strictly limited to adi,ad7817.
This resolves the checkpatch.pl warnings regarding undocumented DT
compatible strings.
Signed-off-by: Taha Narimani <tahanarimani3443@gmail.com>
---
.../bindings/iio/adc/adi,ad7816.yaml | 105 ++++++++++++++++++
1 file changed, 105 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..48563e4
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7816.yaml
@@ -0,0 +1,105 @@
+# 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 / ADC
+
+maintainers:
+ - Taha Narimani <tahanarimani3443@gmail.com>
+
+description: |
+ Analog Devices AD7816, AD7817, and AD7818 10-Bit general purpose ADC and
+ temperature sensor. The device communicates via an SPI interface.
+
+properties:
+ compatible:
+ enum:
+ - adi,ad7816
+ - adi,ad7817
+ - adi,ad7818
+
+ reg:
+ maxItems: 1
+
+ spi-max-frequency:
+ maximum: 12500000
+
+ vdd-supply:
+ description: Main power supply.
+
+ vref-supply:
+ description: |
+ Optional external reference voltage supply. If not provided, the
+ internal reference is used. Applicable for AD7816 and AD7817.
+
+ 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. Only applicable for AD7817.
+
+ interrupts:
+ maxItems: 1
+ description: OTI (Over Temperature Indicator) interrupt. Active low.
+
+required:
+ - compatible
+ - reg
+ - vdd-supply
+ - rdwr-gpios
+ - convert-gpios
+
+allOf:
+ - $ref: /schemas/spi/spi-peripheral-props.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: adi,ad7817
+ then:
+ required:
+ - busy-gpios
+ else:
+ properties:
+ busy-gpios: false
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: adi,ad7818
+ then:
+ properties:
+ vref-supply: 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,ad7817";
+ reg = <0>;
+ spi-max-frequency = <1000000>;
+ vdd-supply = <&vcc>;
+ vref-supply = <&vref>;
+ 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
^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v3 RFC v3] dt-bindings: iio: adc: add ad7816/7/8 digital temperature sensor / ADC
2026-05-30 16:59 [PATCH v3 RFC v3] dt-bindings: iio: adc: add ad7816/7/8 digital temperature sensor / ADC Taha Narimani
@ 2026-05-30 17:09 ` sashiko-bot
2026-05-30 17:13 ` Taha Narimani
2026-05-31 14:41 ` Jonathan Cameron
2026-06-02 17:05 ` Conor Dooley
2 siblings, 1 reply; 6+ messages in thread
From: sashiko-bot @ 2026-05-30 17:09 UTC (permalink / raw)
To: Taha Narimani; +Cc: devicetree, robh, conor+dt
Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider:
- [High] Strictly disallowing `busy-gpios` for `adi,ad7816` breaks the existing driver probe.
- [Medium] `rdwr-gpios` and `convert-gpios` are unconditionally required for all variants, forcing dummy GPIOs for 8-pin devices.
- [Medium] The `vref-supply` property is incorrectly allowed for AD7816 and lacks a schema restriction.
- [Medium] The `interrupts` property is incorrectly permitted for the 8-pin AD7818.
--
commit c95479a0b55dc8599b178909579f060bf75eb282
Author: Taha Narimani <tahanarimani3443@gmail.com>
dt-bindings: iio: adc: add ad7816/7/8 digital temperature sensor / ADC
This commit introduces YAML device tree bindings for the Analog Devices
AD7816, AD7817, and AD7818. It formally documents the required properties
and uses conditionals to restrict busy-gpios to the AD7817 variant based
on hardware capabilities.
> 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 0000000000000..48563e4eab446
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7816.yaml
[ ... ]
> + vref-supply:
> + description: |
> + Optional external reference voltage supply. If not provided, the
> + internal reference is used. Applicable for AD7816 and AD7817.
[Severity: Medium]
Does the AD7816 actually have a VREF pin?
The 8-pin AD7816 lacks an external reference voltage pin due to physical
pinout constraints (power, SPI, CONVST, OTI), and relies entirely on its
internal reference. Should the description limit this to only the AD7817?
[ ... ]
> +required:
> + - compatible
> + - reg
> + - vdd-supply
> + - rdwr-gpios
> + - convert-gpios
[Severity: Medium]
Are rdwr-gpios and convert-gpios present on all these devices?
The AD7816 and AD7818 are 8-pin devices whose pins are fully consumed by
SPI bus communication, power, and their specific analog or interrupt
functions.
Since they physically lack dedicated RD/WR pins, does making these globally
required force device tree authors to invent dummy GPIOs to pass validation?
Should these be conditionally required instead?
> +allOf:
> + - $ref: /schemas/spi/spi-peripheral-props.yaml#
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: adi,ad7817
> + then:
> + required:
> + - busy-gpios
> + else:
> + properties:
> + busy-gpios: false
[Severity: High]
Will this break the existing staging driver probe for the AD7816?
While the hardware lacks a BUSY pin, the driver unconditionally requires this
GPIO for both AD7816 and AD7817 during probe:
drivers/staging/iio/adc/ad7816.c:ad7816_probe() {
...
chip->busy_pin = devm_gpiod_get(&spi_dev->dev, "busy", GPIOD_IN);
...
}
If a device tree complies with this new binding by omitting busy-gpios for
the AD7816, devm_gpiod_get() will return -ENOENT and the driver will abort
probing.
Can we address the driver dependency before strictly enforcing this in the
binding?
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: adi,ad7818
> + then:
> + properties:
> + vref-supply: false
[Severity: Medium]
Should vref-supply: false also be enforced for the AD7816?
Since the AD7816 is an 8-pin device like the AD7818, it seems to rely
entirely on its internal reference without an external pin.
Additionally, does the AD7818 physically support the OTI interrupt?
The AD7818 sacrifices the OTI pin to accommodate its Analog Input (AIN) pin.
Should this conditional block also enforce interrupts: false for the
adi,ad7818 compatible string to prevent physically impossible device tree
configurations?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260530165917.55767-1-tahanarimani3443@gmail.com?part=1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 RFC v3] dt-bindings: iio: adc: add ad7816/7/8 digital temperature sensor / ADC
2026-05-30 17:09 ` sashiko-bot
@ 2026-05-30 17:13 ` Taha Narimani
0 siblings, 0 replies; 6+ messages in thread
From: Taha Narimani @ 2026-05-30 17:13 UTC (permalink / raw)
To: sashiko-reviews; +Cc: devicetree, robh, conor+dt
Hi Sashiko AI (and reviewers),
Thank you for the review.
Regarding the hardware pinouts mentioned in the review, there seem to
be some inaccuracies based on the AD7816/7/8 datasheet:
The AD7816 DOES have a REFIN pin (Pin 4).
Both AD7816 and AD7818 DO have dedicated RD/WR pins (Pin 8) and CONVST
pins (Pin 1).
The AD7818 DOES feature an OTI pin (Pin 2) alongside its VIN (Pin 4).
Therefore, the properties vref-supply, rdwr-gpios, convert-gpios, and
interrupts are physically accurate and correctly represented in this
binding.
However, the review is absolutely correct regarding busy-gpios
breaking the staging driver probe. The existing driver erroneously
requires a BUSY GPIO for the AD7816, which doesn't physically exist on
the chip.
Since DT bindings must describe the hardware rather than accommodate
legacy software bugs, I believe the YAML should strictly disallow
busy-gpios for the AD7816 as proposed. I will send a subsequent patch
to fix drivers/staging/iio/adc/ad7816.c so it no longer enforces the
busy pin requirement on the AD7816.
Best regards, Taha Narimani
On Sat, May 30, 2026 at 8:39 PM <sashiko-bot@kernel.org> wrote:
>
> Thank you for your contribution! Sashiko AI review found 4 potential issue(s) to consider:
> - [High] Strictly disallowing `busy-gpios` for `adi,ad7816` breaks the existing driver probe.
> - [Medium] `rdwr-gpios` and `convert-gpios` are unconditionally required for all variants, forcing dummy GPIOs for 8-pin devices.
> - [Medium] The `vref-supply` property is incorrectly allowed for AD7816 and lacks a schema restriction.
> - [Medium] The `interrupts` property is incorrectly permitted for the 8-pin AD7818.
> --
>
> commit c95479a0b55dc8599b178909579f060bf75eb282
> Author: Taha Narimani <tahanarimani3443@gmail.com>
>
> dt-bindings: iio: adc: add ad7816/7/8 digital temperature sensor / ADC
>
> This commit introduces YAML device tree bindings for the Analog Devices
> AD7816, AD7817, and AD7818. It formally documents the required properties
> and uses conditionals to restrict busy-gpios to the AD7817 variant based
> on hardware capabilities.
>
> > 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 0000000000000..48563e4eab446
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7816.yaml
>
> [ ... ]
>
> > + vref-supply:
> > + description: |
> > + Optional external reference voltage supply. If not provided, the
> > + internal reference is used. Applicable for AD7816 and AD7817.
>
> [Severity: Medium]
> Does the AD7816 actually have a VREF pin?
>
> The 8-pin AD7816 lacks an external reference voltage pin due to physical
> pinout constraints (power, SPI, CONVST, OTI), and relies entirely on its
> internal reference. Should the description limit this to only the AD7817?
>
> [ ... ]
>
> > +required:
> > + - compatible
> > + - reg
> > + - vdd-supply
> > + - rdwr-gpios
> > + - convert-gpios
>
> [Severity: Medium]
> Are rdwr-gpios and convert-gpios present on all these devices?
>
> The AD7816 and AD7818 are 8-pin devices whose pins are fully consumed by
> SPI bus communication, power, and their specific analog or interrupt
> functions.
>
> Since they physically lack dedicated RD/WR pins, does making these globally
> required force device tree authors to invent dummy GPIOs to pass validation?
> Should these be conditionally required instead?
>
> > +allOf:
> > + - $ref: /schemas/spi/spi-peripheral-props.yaml#
> > + - if:
> > + properties:
> > + compatible:
> > + contains:
> > + const: adi,ad7817
> > + then:
> > + required:
> > + - busy-gpios
> > + else:
> > + properties:
> > + busy-gpios: false
>
> [Severity: High]
> Will this break the existing staging driver probe for the AD7816?
>
> While the hardware lacks a BUSY pin, the driver unconditionally requires this
> GPIO for both AD7816 and AD7817 during probe:
>
> drivers/staging/iio/adc/ad7816.c:ad7816_probe() {
> ...
> chip->busy_pin = devm_gpiod_get(&spi_dev->dev, "busy", GPIOD_IN);
> ...
> }
>
> If a device tree complies with this new binding by omitting busy-gpios for
> the AD7816, devm_gpiod_get() will return -ENOENT and the driver will abort
> probing.
>
> Can we address the driver dependency before strictly enforcing this in the
> binding?
>
> > + - if:
> > + properties:
> > + compatible:
> > + contains:
> > + const: adi,ad7818
> > + then:
> > + properties:
> > + vref-supply: false
>
> [Severity: Medium]
> Should vref-supply: false also be enforced for the AD7816?
>
> Since the AD7816 is an 8-pin device like the AD7818, it seems to rely
> entirely on its internal reference without an external pin.
>
> Additionally, does the AD7818 physically support the OTI interrupt?
>
> The AD7818 sacrifices the OTI pin to accommodate its Analog Input (AIN) pin.
> Should this conditional block also enforce interrupts: false for the
> adi,ad7818 compatible string to prevent physically impossible device tree
> configurations?
>
> --
> Sashiko AI review · https://sashiko.dev/#/patchset/20260530165917.55767-1-tahanarimani3443@gmail.com?part=1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 RFC v3] dt-bindings: iio: adc: add ad7816/7/8 digital temperature sensor / ADC
2026-05-30 16:59 [PATCH v3 RFC v3] dt-bindings: iio: adc: add ad7816/7/8 digital temperature sensor / ADC Taha Narimani
2026-05-30 17:09 ` sashiko-bot
@ 2026-05-31 14:41 ` Jonathan Cameron
2026-05-31 17:04 ` Taha Narimani
2026-06-02 17:05 ` Conor Dooley
2 siblings, 1 reply; 6+ messages in thread
From: Jonathan Cameron @ 2026-05-31 14:41 UTC (permalink / raw)
To: Taha Narimani
Cc: Lars-Peter Clausen, Michael Hennerich, David Lechner,
Nuno Sá, Andy Shevchenko, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, open list:IIO SUBSYSTEM AND DRIVERS,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list
On Sat, 30 May 2026 16:59:15 +0000
Taha Narimani <tahanarimani3443@gmail.com> wrote:
> Document the Analog Devices AD7816, AD7817, and AD7818 digital
> temperature sensor and ADC bindings in YAML format.
>
> Please note that the driver for this device is currently in drivers/staging.
> This patch is sent as an RFC to clean up and standardize the device tree
> bindings prior to any major driver refactoring.
>
> While reviewing the AD7816/7/8 datasheet to correctly document the properties,
> it was noted that the current staging driver attempts to request a 'busy' GPIO
> for both AD7816 and AD7817. However, the AD7816 is an 8-pin device and does
> not possess a BUSY pin (only the 16-pin AD7817 has it). Therefore, in this
> binding, busy-gpios is strictly limited to adi,ad7817.
>
> This resolves the checkpatch.pl warnings regarding undocumented DT
> compatible strings.
>
> Signed-off-by: Taha Narimani <tahanarimani3443@gmail.com>
> ---
Hi Taha,
There should be a change log here. Please reply to this thread with that for
this version.
Also, slow down. For any patch allow at least 24 hours unless a maintainer
specifically requests it faster. For most stuff a week. That way any ongoing
discussion can finish and additional reviewers have time to take a look.
> .../bindings/iio/adc/adi,ad7816.yaml | 105 ++++++++++++++++++
> 1 file changed, 105 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..48563e4
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7816.yaml
> @@ -0,0 +1,105 @@
> +# 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 / ADC
> +
> +maintainers:
> + - Taha Narimani <tahanarimani3443@gmail.com>
> +
> +description: |
> + Analog Devices AD7816, AD7817, and AD7818 10-Bit general purpose ADC and
> + temperature sensor. The device communicates via an SPI interface.
> +
> +properties:
> + compatible:
> + enum:
> + - adi,ad7816
> + - adi,ad7817
> + - adi,ad7818
> +
> + reg:
> + maxItems: 1
> +
> + spi-max-frequency:
> + maximum: 12500000
> +
> + vdd-supply:
> + description: Main power supply.
> +
> + vref-supply:
> + description: |
> + Optional external reference voltage supply. If not provided, the
> + internal reference is used. Applicable for AD7816 and AD7817.
> +
> + 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. Only applicable for AD7817.
> +
> + interrupts:
> + maxItems: 1
> + description: OTI (Over Temperature Indicator) interrupt. Active low.
> +
> +required:
> + - compatible
> + - reg
> + - vdd-supply
> + - rdwr-gpios
> + - convert-gpios
> +
> +allOf:
> + - $ref: /schemas/spi/spi-peripheral-props.yaml#
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: adi,ad7817
> + then:
> + required:
> + - busy-gpios
> + else:
> + properties:
> + busy-gpios: false
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: adi,ad7818
> + then:
> + properties:
> + vref-supply: 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,ad7817";
> + reg = <0>;
> + spi-max-frequency = <1000000>;
> + vdd-supply = <&vcc>;
> + vref-supply = <&vref>;
> + 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>;
> + };
> + };
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 RFC v3] dt-bindings: iio: adc: add ad7816/7/8 digital temperature sensor / ADC
2026-05-31 14:41 ` Jonathan Cameron
@ 2026-05-31 17:04 ` Taha Narimani
0 siblings, 0 replies; 6+ messages in thread
From: Taha Narimani @ 2026-05-31 17:04 UTC (permalink / raw)
To: Jonathan Cameron
Cc: Lars-Peter Clausen, Michael Hennerich, David Lechner,
Nuno Sá, Andy Shevchenko, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, open list:IIO SUBSYSTEM AND DRIVERS,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list
Hi Jonathan,
Thank you for your patience and the detailed review of v2. I apologize
for rushing the v3 submission and omitting the changelog. I am still
familiarizing myself with the kernel mailing list etiquette, and I
will certainly slow down and allow at least a week for future patch
revisions to ensure proper discussion time.
As you recommended, I took a step back and thoroughly read the
AD7816/7/8 datasheets. That was a great learning point—it helped me
realize that the AD7816 (8-pin) completely lacks a BUSY pin, which the
current staging driver incorrectly requests unconditionally. I also
mapped out the missing power supplies and OTI interrupts based on the
datasheet specifications to make the binding complete.
Here is the requested changelog for this version:
Changes in v3:
- Updated the patch title and marked it explicitly as an RFC, noting
the driver's staging status.
- Added `spi-max-frequency` with a maximum limit of 12.5MHz based on
the datasheet.
- Added `vdd-supply` and `vref-supply` properties (making vref-supply
optional where an internal reference exists).
- Implemented conditional schema logic: restricted `busy-gpios`
exclusively to the `adi,ad7817` variant and disallowed `vref-supply`
for `adi,ad7818`.
- Documented the `interrupts` property for the OTI pin (Active low) to
resolve the validation error in the v2 example.
- Modified the example block to use `adi,ad7817` to correctly align
with the `busy-gpios` requirement.
Best regards,
Taha Narimani
On Sun, May 31, 2026 at 6:12 PM Jonathan Cameron <jic23@kernel.org> wrote:
>
> On Sat, 30 May 2026 16:59:15 +0000
> Taha Narimani <tahanarimani3443@gmail.com> wrote:
>
> > Document the Analog Devices AD7816, AD7817, and AD7818 digital
> > temperature sensor and ADC bindings in YAML format.
> >
> > Please note that the driver for this device is currently in drivers/staging.
> > This patch is sent as an RFC to clean up and standardize the device tree
> > bindings prior to any major driver refactoring.
> >
> > While reviewing the AD7816/7/8 datasheet to correctly document the properties,
> > it was noted that the current staging driver attempts to request a 'busy' GPIO
> > for both AD7816 and AD7817. However, the AD7816 is an 8-pin device and does
> > not possess a BUSY pin (only the 16-pin AD7817 has it). Therefore, in this
> > binding, busy-gpios is strictly limited to adi,ad7817.
> >
> > This resolves the checkpatch.pl warnings regarding undocumented DT
> > compatible strings.
> >
> > Signed-off-by: Taha Narimani <tahanarimani3443@gmail.com>
> > ---
> Hi Taha,
>
> There should be a change log here. Please reply to this thread with that for
> this version.
>
> Also, slow down. For any patch allow at least 24 hours unless a maintainer
> specifically requests it faster. For most stuff a week. That way any ongoing
> discussion can finish and additional reviewers have time to take a look.
>
>
> > .../bindings/iio/adc/adi,ad7816.yaml | 105 ++++++++++++++++++
> > 1 file changed, 105 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..48563e4
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7816.yaml
> > @@ -0,0 +1,105 @@
> > +# 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 / ADC
> > +
> > +maintainers:
> > + - Taha Narimani <tahanarimani3443@gmail.com>
> > +
> > +description: |
> > + Analog Devices AD7816, AD7817, and AD7818 10-Bit general purpose ADC and
> > + temperature sensor. The device communicates via an SPI interface.
> > +
> > +properties:
> > + compatible:
> > + enum:
> > + - adi,ad7816
> > + - adi,ad7817
> > + - adi,ad7818
> > +
> > + reg:
> > + maxItems: 1
> > +
> > + spi-max-frequency:
> > + maximum: 12500000
> > +
> > + vdd-supply:
> > + description: Main power supply.
> > +
> > + vref-supply:
> > + description: |
> > + Optional external reference voltage supply. If not provided, the
> > + internal reference is used. Applicable for AD7816 and AD7817.
> > +
> > + 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. Only applicable for AD7817.
> > +
> > + interrupts:
> > + maxItems: 1
> > + description: OTI (Over Temperature Indicator) interrupt. Active low.
> > +
> > +required:
> > + - compatible
> > + - reg
> > + - vdd-supply
> > + - rdwr-gpios
> > + - convert-gpios
> > +
> > +allOf:
> > + - $ref: /schemas/spi/spi-peripheral-props.yaml#
> > + - if:
> > + properties:
> > + compatible:
> > + contains:
> > + const: adi,ad7817
> > + then:
> > + required:
> > + - busy-gpios
> > + else:
> > + properties:
> > + busy-gpios: false
> > + - if:
> > + properties:
> > + compatible:
> > + contains:
> > + const: adi,ad7818
> > + then:
> > + properties:
> > + vref-supply: 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,ad7817";
> > + reg = <0>;
> > + spi-max-frequency = <1000000>;
> > + vdd-supply = <&vcc>;
> > + vref-supply = <&vref>;
> > + 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>;
> > + };
> > + };
>
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 RFC v3] dt-bindings: iio: adc: add ad7816/7/8 digital temperature sensor / ADC
2026-05-30 16:59 [PATCH v3 RFC v3] dt-bindings: iio: adc: add ad7816/7/8 digital temperature sensor / ADC Taha Narimani
2026-05-30 17:09 ` sashiko-bot
2026-05-31 14:41 ` Jonathan Cameron
@ 2026-06-02 17:05 ` Conor Dooley
2 siblings, 0 replies; 6+ messages in thread
From: Conor Dooley @ 2026-06-02 17:05 UTC (permalink / raw)
To: Taha Narimani
Cc: Lars-Peter Clausen, Michael Hennerich, Jonathan Cameron,
David Lechner, Nuno Sá, Andy Shevchenko, Rob Herring,
Krzysztof Kozlowski, Conor Dooley,
open list:IIO SUBSYSTEM AND DRIVERS,
open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
open list
[-- Attachment #1: Type: text/plain, Size: 1011 bytes --]
On Sat, May 30, 2026 at 04:59:15PM +0000, Taha Narimani wrote:
> Document the Analog Devices AD7816, AD7817, and AD7818 digital
> temperature sensor and ADC bindings in YAML format.
>
> Please note that the driver for this device is currently in drivers/staging.
> This patch is sent as an RFC to clean up and standardize the device tree
> bindings prior to any major driver refactoring.
>
> While reviewing the AD7816/7/8 datasheet to correctly document the properties,
> it was noted that the current staging driver attempts to request a 'busy' GPIO
> for both AD7816 and AD7817. However, the AD7816 is an 8-pin device and does
> not possess a BUSY pin (only the 16-pin AD7817 has it). Therefore, in this
> binding, busy-gpios is strictly limited to adi,ad7817.
>
> This resolves the checkpatch.pl warnings regarding undocumented DT
> compatible strings.
>
> Signed-off-by: Taha Narimani <tahanarimani3443@gmail.com>
This seems probably okay, but I'm not willing to ack it as an RFC.
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2026-06-02 17:05 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-30 16:59 [PATCH v3 RFC v3] dt-bindings: iio: adc: add ad7816/7/8 digital temperature sensor / ADC Taha Narimani
2026-05-30 17:09 ` sashiko-bot
2026-05-30 17:13 ` Taha Narimani
2026-05-31 14:41 ` Jonathan Cameron
2026-05-31 17:04 ` Taha Narimani
2026-06-02 17:05 ` Conor Dooley
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox