Re: [PATCH 1/2] dt-bindings: iio: adc: ti,ads112c04: Add binding for ADS112C04

Kyle Hsieh <[email protected]>
Newsgroups org.kernel.vger.linux-iio,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel
Message-ID <CAF7HswN-dWOuSDk=BNqXA9HxHFZFEzuRZ9qF2du7KXm6JXFNLw@mail.gmail.com>
Hi David,
Thank you for the review and for pointing me to your ADS112C14 work!
It is incredibly helpful as a reference.

On Tue, Jul 28, 2026 at 10:48 PM David Lechner <[email protected]> wrote:
>
> On 7/28/26 3:01 AM, Kyle Hsieh wrote:
> > Add device tree binding documentation for Texas Instruments ADS112C04
> > I2C Analog-to-Digital Converters.
>
> If you haven't seen it already, I'm currently working on ADS112C14
> which is a more complex, but otherwise very similar version of this
> chip.
>
> I think the differences are enough that it would be quite messy to
> try to share DT bindings and code, so OK with me to proceed with
> new bindings and driver. But we should try to make the use all of
> the same conventions as much as we can. (And to make maintainers
> happy, explain this in the cover letter so they don't ask why we
> we need a new bindings/driver.)
>
> For reference here are the bindings for that:
>
> https://git.kernel.org/pub/scm/linux/kernel/git/jic23/iio.git/tree/Documentation/devicetree/bindings/iio/adc/ti,ads112c14.yaml?h=testing
>
I completely agree it is best to keep them as separate drivers due to
the hardware differences. I will explain this decision and mention your
ADS112C14 work in the next patch cover letter to avoid any confusion.
> >
> > These devices provide 4-channel, 16-bit delta-sigma ADCs with an I2C
> > interface, programmable gain amplifier (PGA), and data-ready (DRDY)
> > interrupt output.
> >
> > Signed-off-by: Kyle Hsieh <[email protected]>
> > ---
> >  .../devicetree/bindings/iio/adc/ti,ads112c04.yaml  | 76 ++++++++++++++++++++++
> >  1 file changed, 76 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/iio/adc/ti,ads112c04.yaml b/Documentation/devicetree/bindings/iio/adc/ti,ads112c04.yaml
> > new file mode 100644
> > index 000000000000..55842fca1215
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/iio/adc/ti,ads112c04.yaml
> > @@ -0,0 +1,76 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/iio/adc/ti,ads112c04.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Texas Instruments ADS112C04 ADC
> > +
> > +maintainers:
> > +  - Kyle Hsieh <[email protected]>
> > +
> > +description: |
> > +  The ADS112C04 (16-bit) are precision analog-to-digital converters (ADCs)
> > +  with an I2C interface. They feature a flexible input multiplexer, a
> > +  low-noise programmable gain amplifier (PGA), two programmable excitation
> > +  current sources, a voltage reference, and a precision temperature sensor.
> > +
> > +properties:
> > +  compatible:
> > +    enum:
> > +      - ti,ads112c04
> > +
> > +  reg:
> > +    maxItems: 1
> > +    description: I2C address of the device.
> > +
> > +  interrupts:
> > +    maxItems: 1
> > +    description:
> > +      Data ready (DRDY) interrupt output. It is asserted low when a new
> > +      conversion is ready.
> > +
> > +  "#io-channel-cells":
> > +    const: 1
> > +
> > +  reset-gpios:
> > +    maxItems: 1
> > +    description:
> > +      GPIO connected to the RESET pin. Active low.
> > +
> > +  avdd-supply:
> > +    description: Analog power supply (AVDD).
> > +
> > +  dvdd-supply:
> > +    description: Digital power supply (DVDD).
> > +
> > +  vref-supply:
> > +    description: External reference power supply (connected to REFP/REFN).
>
> VREF is an internal signal. Technically, these are REFP and REFN and both
> could have a supply connected to them. Also, there could be a resistor
> connected across these instead of a supply. See ti,refp-refn-resistor-ohms
> in ADS112C14 bindings and 3-wire RTD example in the datasheet (figure 74).
>
> Additionally, we need channel properties to describe a bit about what is
> connected to each AINn pin.  We will need single-channel, diff-channels,
> excitation-channels, excitation-current-nanoamp, and reference-sources
> similar to ADS112C14.
>
Understood. I will drop `vref-supply` and refer ADS112C14 implement  to
reflect the physical hardware accurately.
I will also add the child node pattern for dynamic channel configuration
 matching your conventions.
> > +
> > +required:
> > +  - compatible
> > +  - reg
>
> avdd-supply and dvdd-supply are required to power the device.
>
Makes sense. I will add `avdd-supply` and `dvdd-supply` to the required
list in the next version.
> > +
> > +additionalProperties: false
> > +
> > +examples:
> > +  - |
> > +    #include <dt-bindings/interrupt-controller/irq.h>
> > +    #include <dt-bindings/gpio/gpio.h>
> > +    i2c {
> > +        #address-cells = <1>;
> > +        #size-cells = <0>;
> > +
> > +        adc@40 {
> > +            compatible = "ti,ads112c04";
> > +            reg = <0x40>;
> > +            interrupt-parent = <&gpio>;
> > +            interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
> > +            #io-channel-cells = <1>;
> > +            reset-gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
> > +            avdd-supply = <&vdd_3v3_reg>;
> > +            dvdd-supply = <&vdd_3v3_reg>;
> > +            vref-supply = <&vref_reg>;
> > +        };
> > +    };
> > +...
> >
>
Thanks again for the guidance!
Best regards,
Kyle Hsieh
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.