* [PATCH v3 0/1] dt-bindings: iio: adc: add AD7816/AD7817/AD7818 binding @ 2026-05-09 2:27 Hungyu Lin 2026-05-09 2:27 ` [PATCH v3 1/1] " Hungyu Lin 2026-05-09 22:21 ` [PATCH v3 0/1] " David Lechner 0 siblings, 2 replies; 10+ messages in thread From: Hungyu Lin @ 2026-05-09 2:27 UTC (permalink / raw) To: lars, Michael.Hennerich, jic23, robh, krzk+dt, conor+dt Cc: dlechner, nuno.sa, andy, linux-iio, devicetree, linux-kernel, Hungyu Lin Changes in v3: - Fix commit message based on input from Sanjay Chitroda Changes in v2: - Fix commit message to match binding requirements Hungyu Lin (1): dt-bindings: iio: adc: add AD7816/AD7817/AD7818 binding .../bindings/iio/adc/adi,ad7816.yaml | 94 +++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7816.yaml -- 2.34.1 ^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH v3 1/1] dt-bindings: iio: adc: add AD7816/AD7817/AD7818 binding 2026-05-09 2:27 [PATCH v3 0/1] dt-bindings: iio: adc: add AD7816/AD7817/AD7818 binding Hungyu Lin @ 2026-05-09 2:27 ` Hungyu Lin 2026-05-09 22:13 ` David Lechner 2026-05-11 16:52 ` Jonathan Cameron 2026-05-09 22:21 ` [PATCH v3 0/1] " David Lechner 1 sibling, 2 replies; 10+ messages in thread From: Hungyu Lin @ 2026-05-09 2:27 UTC (permalink / raw) To: lars, Michael.Hennerich, jic23, robh, krzk+dt, conor+dt Cc: dlechner, nuno.sa, andy, linux-iio, devicetree, linux-kernel, Hungyu Lin Add Device Tree binding documentation for the Analog Devices AD7816, AD7817 and AD7818 SPI ADC devices. The AD7816 provides temperature monitoring only, while the AD7817 and AD7818 provide analog input channels with an on-chip temperature sensor. The devices use control GPIOs for RD/WR and CONVST. BUSY is required for AD7816 and AD7817 variants. Signed-off-by: Hungyu Lin <dennylin0707@gmail.com> --- Changes in v3: - Fix commit message to match binding requirements - Fix commit message based on input from Sanjay Chitroda --- .../bindings/iio/adc/adi,ad7816.yaml | 94 +++++++++++++++++++ 1 file changed, 94 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..490e5338d7b2 --- /dev/null +++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7816.yaml @@ -0,0 +1,94 @@ +# 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: + - Hungyu Lin <dennylin0707@gmail.com> + +description: | + Binding for Analog Devices AD7816, AD7817 and AD7818 SPI ADCs + with on-chip temperature sensor. + + The AD7816 provides temperature monitoring only. + The AD7817 provides up to 4 analog input channels. + The AD7818 provides a single analog input channel. + +properties: + compatible: + enum: + - adi,ad7816 + - adi,ad7817 + - adi,ad7818 + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + description: + Optional interrupt line used by the device. + + rdwr-gpios: + maxItems: 1 + description: + GPIO connected to the RD/WR pin used to control read/write cycles. + + convert-gpios: + maxItems: 1 + description: + GPIO connected to the CONVST pin used to trigger conversions. + + busy-gpios: + maxItems: 1 + description: + GPIO connected to the BUSY pin indicating conversion status. + +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: + - | + gpio0: gpio { + gpio-controller; + #gpio-cells = <2>; + }; + + spi { + #address-cells = <1>; + #size-cells = <0>; + + adc@0 { + compatible = "adi,ad7816"; + reg = <0>; + spi-max-frequency = <5000000>; + rdwr-gpios = <&gpio0 1 0>; + convert-gpios = <&gpio0 2 0>; + busy-gpios = <&gpio0 3 0>; + }; + }; -- 2.34.1 ^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [PATCH v3 1/1] dt-bindings: iio: adc: add AD7816/AD7817/AD7818 binding 2026-05-09 2:27 ` [PATCH v3 1/1] " Hungyu Lin @ 2026-05-09 22:13 ` David Lechner 2026-05-10 1:37 ` Denny Lin 2026-05-11 16:52 ` Jonathan Cameron 1 sibling, 1 reply; 10+ messages in thread From: David Lechner @ 2026-05-09 22:13 UTC (permalink / raw) To: Hungyu Lin, lars, Michael.Hennerich, jic23, robh, krzk+dt, conor+dt Cc: nuno.sa, andy, linux-iio, devicetree, linux-kernel On 5/8/26 9:27 PM, Hungyu Lin wrote: > Add Device Tree binding documentation for the Analog Devices > AD7816, AD7817 and AD7818 SPI ADC devices. > Why are we adding bindings without a driver to use them? ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3 1/1] dt-bindings: iio: adc: add AD7816/AD7817/AD7818 binding 2026-05-09 22:13 ` David Lechner @ 2026-05-10 1:37 ` Denny Lin 2026-05-11 14:51 ` David Lechner 0 siblings, 1 reply; 10+ messages in thread From: Denny Lin @ 2026-05-10 1:37 UTC (permalink / raw) To: David Lechner Cc: lars, Michael.Hennerich, jic23, robh, krzk+dt, conor+dt, nuno.sa, andy, linux-iio, devicetree, linux-kernel Hi David, > Why are we adding bindings without a driver to use them? There is already a driver for these devices in drivers/staging/iio/adc/ad7816.c, which includes OF match entries for "adi,ad7816", "adi,ad7817", and "adi,ad7818". This binding is intended to document the existing DT interface. Thanks, Hungyu On Sat, May 9, 2026 at 3:13 PM David Lechner <dlechner@baylibre.com> wrote: > > On 5/8/26 9:27 PM, Hungyu Lin wrote: > > Add Device Tree binding documentation for the Analog Devices > > AD7816, AD7817 and AD7818 SPI ADC devices. > > > Why are we adding bindings without a driver to use them? ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3 1/1] dt-bindings: iio: adc: add AD7816/AD7817/AD7818 binding 2026-05-10 1:37 ` Denny Lin @ 2026-05-11 14:51 ` David Lechner 2026-05-11 16:23 ` Denny Lin 0 siblings, 1 reply; 10+ messages in thread From: David Lechner @ 2026-05-11 14:51 UTC (permalink / raw) To: Denny Lin Cc: lars, Michael.Hennerich, jic23, robh, krzk+dt, conor+dt, nuno.sa, andy, linux-iio, devicetree, linux-kernel On 5/9/26 8:37 PM, Denny Lin wrote: > Hi David, > >> Why are we adding bindings without a driver to use them? > > There is already a driver for these devices in > drivers/staging/iio/adc/ad7816.c, which includes OF match entries > for "adi,ad7816", "adi,ad7817", and "adi,ad7818". > > This binding is intended to document the existing DT interface. Usually, we want to be moving the drivers out of staging when adding the DT bindings so that it all gets reviewed for correctness at the same time. Drivers in staging are usually there because they are doing things that are not actually acceptable for the final stable mainline version of a driver and need more work. > > Thanks, > Hungyu > > On Sat, May 9, 2026 at 3:13 PM David Lechner <dlechner@baylibre.com> wrote: >> >> On 5/8/26 9:27 PM, Hungyu Lin wrote: >>> Add Device Tree binding documentation for the Analog Devices >>> AD7816, AD7817 and AD7818 SPI ADC devices. >>> >> Why are we adding bindings without a driver to use them? ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3 1/1] dt-bindings: iio: adc: add AD7816/AD7817/AD7818 binding 2026-05-11 14:51 ` David Lechner @ 2026-05-11 16:23 ` Denny Lin 2026-05-11 16:31 ` David Lechner 0 siblings, 1 reply; 10+ messages in thread From: Denny Lin @ 2026-05-11 16:23 UTC (permalink / raw) To: David Lechner Cc: lars, Michael.Hennerich, jic23, robh, krzk+dt, conor+dt, nuno.sa, andy, linux-iio, devicetree, linux-kernel On Mon, May 11, 2026 at 7:51 AM David Lechner <dlechner@baylibre.com> wrote: > > Usually, we want to be moving the drivers out of staging when > adding the DT bindings so that it all gets reviewed for correctness > at the same time. > > Drivers in staging are usually there because they are doing things > that are not actually acceptable for the final stable mainline > version of a driver and need more work. > Thanks for the explanation. I took a look at the driver and noticed it still uses the older IIO sysfs-based interface rather than the iio_chan_spec + read_raw model. Would you recommend updating the driver first, or is it okay to proceed with the binding separately? Thanks, Hungyu ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3 1/1] dt-bindings: iio: adc: add AD7816/AD7817/AD7818 binding 2026-05-11 16:23 ` Denny Lin @ 2026-05-11 16:31 ` David Lechner 2026-05-12 11:22 ` Jonathan Cameron 0 siblings, 1 reply; 10+ messages in thread From: David Lechner @ 2026-05-11 16:31 UTC (permalink / raw) To: Denny Lin Cc: lars, Michael.Hennerich, jic23, robh, krzk+dt, conor+dt, nuno.sa, andy, linux-iio, devicetree, linux-kernel On 5/11/26 11:23 AM, Denny Lin wrote: > On Mon, May 11, 2026 at 7:51 AM David Lechner <dlechner@baylibre.com> wrote: >> >> Usually, we want to be moving the drivers out of staging when >> adding the DT bindings so that it all gets reviewed for correctness >> at the same time. >> >> Drivers in staging are usually there because they are doing things >> that are not actually acceptable for the final stable mainline >> version of a driver and need more work. >> > > Thanks for the explanation. > > I took a look at the driver and noticed it still uses the older > IIO sysfs-based interface rather than the iio_chan_spec + read_raw > model. > > Would you recommend updating the driver first, or is it okay to > proceed with the binding separately? > > Thanks, > Hungyu ADI's website says that these parts are obsolete, so unless anyone is actually still using these with a mainline kernel, I would suggest that we drop the driver rather than spending time fixing it up. In any case, unless you have the hardware for testing, it would be best not to make significant changes. There is a non-standard "oti" attribute that we would need to figure out what to do with. This is likely why the driver is in staging in the first place. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3 1/1] dt-bindings: iio: adc: add AD7816/AD7817/AD7818 binding 2026-05-11 16:31 ` David Lechner @ 2026-05-12 11:22 ` Jonathan Cameron 0 siblings, 0 replies; 10+ messages in thread From: Jonathan Cameron @ 2026-05-12 11:22 UTC (permalink / raw) To: David Lechner Cc: Denny Lin, lars, Michael.Hennerich, robh, krzk+dt, conor+dt, nuno.sa, andy, linux-iio, devicetree, linux-kernel On Mon, 11 May 2026 11:31:13 -0500 David Lechner <dlechner@baylibre.com> wrote: > On 5/11/26 11:23 AM, Denny Lin wrote: > > On Mon, May 11, 2026 at 7:51 AM David Lechner <dlechner@baylibre.com> wrote: > >> > >> Usually, we want to be moving the drivers out of staging when > >> adding the DT bindings so that it all gets reviewed for correctness > >> at the same time. > >> > >> Drivers in staging are usually there because they are doing things > >> that are not actually acceptable for the final stable mainline > >> version of a driver and need more work. > >> > > > > Thanks for the explanation. > > > > I took a look at the driver and noticed it still uses the older > > IIO sysfs-based interface rather than the iio_chan_spec + read_raw > > model. > > > > Would you recommend updating the driver first, or is it okay to > > proceed with the binding separately? > > > > Thanks, > > Hungyu > > ADI's website says that these parts are obsolete, so unless anyone is > actually still using these with a mainline kernel, I would suggest that > we drop the driver rather than spending time fixing it up. The ad7817 isn't obsolete yet unfortunately - that's the only reason I didn't drop this last time I checked.. Any Analog folk want to take a view on this one - particularly if you can check if it will be going obsolete soon. Good not to waste Denny's time on this if so! J > > In any case, unless you have the hardware for testing, it would be > best not to make significant changes. There is a non-standard "oti" > attribute that we would need to figure out what to do with. This is > likely why the driver is in staging in the first place. ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3 1/1] dt-bindings: iio: adc: add AD7816/AD7817/AD7818 binding 2026-05-09 2:27 ` [PATCH v3 1/1] " Hungyu Lin 2026-05-09 22:13 ` David Lechner @ 2026-05-11 16:52 ` Jonathan Cameron 1 sibling, 0 replies; 10+ messages in thread From: Jonathan Cameron @ 2026-05-11 16:52 UTC (permalink / raw) To: Hungyu Lin Cc: lars, Michael.Hennerich, robh, krzk+dt, conor+dt, dlechner, nuno.sa, andy, linux-iio, devicetree, linux-kernel On Sat, 9 May 2026 02:27:18 +0000 Hungyu Lin <dennylin0707@gmail.com> wrote: > Add Device Tree binding documentation for the Analog Devices > AD7816, AD7817 and AD7818 SPI ADC devices. > > The AD7816 provides temperature monitoring only, while the > AD7817 and AD7818 provide analog input channels with an > on-chip temperature sensor. > > The devices use control GPIOs for RD/WR and CONVST. BUSY is required for > AD7816 and AD7817 variants. > > Signed-off-by: Hungyu Lin <dennylin0707@gmail.com> Subject to the discussion you had with David about us only normally adding a dt-binding as part of the final series that moves a driver out of staging. This looks fine to me. Note I've been hopefully checking analog.com every 6 months or so for the ad7817 to go obsolete - (no luck yet!) - hence I haven't deleted the driver despite no one getting it into a reasonable state for many years. If you are interested in doing that work then great! Maybe the Analog devices folk can help you out with testing etc. Jonathan ^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [PATCH v3 0/1] dt-bindings: iio: adc: add AD7816/AD7817/AD7818 binding 2026-05-09 2:27 [PATCH v3 0/1] dt-bindings: iio: adc: add AD7816/AD7817/AD7818 binding Hungyu Lin 2026-05-09 2:27 ` [PATCH v3 1/1] " Hungyu Lin @ 2026-05-09 22:21 ` David Lechner 1 sibling, 0 replies; 10+ messages in thread From: David Lechner @ 2026-05-09 22:21 UTC (permalink / raw) To: Hungyu Lin, lars, Michael.Hennerich, jic23, robh, krzk+dt, conor+dt Cc: nuno.sa, andy, linux-iio, devicetree, linux-kernel On 5/8/26 9:27 PM, Hungyu Lin wrote: > Changes in v3: > - Fix commit message based on input from Sanjay Chitroda > > Changes in v2: > - Fix commit message to match binding requirements > > Hungyu Lin (1): > dt-bindings: iio: adc: add AD7816/AD7817/AD7818 binding > > .../bindings/iio/adc/adi,ad7816.yaml | 94 +++++++++++++++++++ > 1 file changed, 94 insertions(+) > create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7816.yaml > Don't need a cover letter for a single patch. Just put this after --- in the commit message of the patch. ^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2026-05-12 11:22 UTC | newest] Thread overview: 10+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2026-05-09 2:27 [PATCH v3 0/1] dt-bindings: iio: adc: add AD7816/AD7817/AD7818 binding Hungyu Lin 2026-05-09 2:27 ` [PATCH v3 1/1] " Hungyu Lin 2026-05-09 22:13 ` David Lechner 2026-05-10 1:37 ` Denny Lin 2026-05-11 14:51 ` David Lechner 2026-05-11 16:23 ` Denny Lin 2026-05-11 16:31 ` David Lechner 2026-05-12 11:22 ` Jonathan Cameron 2026-05-11 16:52 ` Jonathan Cameron 2026-05-09 22:21 ` [PATCH v3 0/1] " David Lechner
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox