.../devicetree/bindings/iio/adc/ti,ads112c04.yaml | 146 +++++++ drivers/iio/adc/Kconfig | 10 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/ti-ads112c04.c | 423 +++++++++++++++++++++ 4 files changed, 580 insertions(+)
This patch series introduces support for the Texas Instruments ADS112C04
Analog-to-Digital Converters.
The ADS112C04 (16-bit) is precision, low-power, delta-sigma ADCs with
an I2C interface. They feature a flexible input multiplexer supporting
single-ended and differential measurements, a programmable gain amplifier,
and an internal voltage reference.
Note: While this chip shares similarities with the ADS112C14 (currently
being upstreamed by David Lechner), the register maps and feature sets
are sufficiently different to warrant a separate driver. However, the
DT bindings and channel parsing logic have been aligned with the
ADS112C14 conventions.
This initial submission provides a minimal feature set (single-shot
conversions and basic DRDY interrupt) covering current use cases.
Signed-off-by: Kyle Hsieh <kylehsieh1995@gmail.com>
---
Changes in v3:
- dt-bindings: iio: adc: ti,ads112c04:
- Resolved dt_binding_check errors by removing redundant $ref for
standard unit suffixes and fixing YAML array syntax.
- Added full hardware capability descriptions (excitation-channels,
excitation-current-nanoamp, burn-out-current-nanoamp,
reference-sources) as suggested by David Lechner.
- Restricted the reg maximum to 11 and updated the regex to
^channel@[0-9a-b]$ to accurately reflect the 12 possible MUX
combinations.
- iio: adc: ti-ads112c04:
- Transitioned all I2C read/write wrappers to use SMBus APIs
(i2c_smbus_read_byte_data, i2c_smbus_read_word_data, etc.) to
gracefully handle I2C errors, NACKs, and Repeated Starts, addressing
feedback from Joshua Crofts and Jonathan Cameron.
- Added forward compatibility checks in probe() and parse_channels()
using dev_err_probe() to return -EOPNOTSUPP for unimplemented DT
properties.
- Reverted devm_request_irq() flags to 0 to let the driver inherit the
trigger type strictly from the DT, per Jonathan Cameron's advice.
- Reduced the data wait timeout to 100ms, reflecting the chip's slowest
data rate of 20 SPS.
- Fixed #include alphabetical sorting, grouped <linux/iio/*> headers,
and added missing headers.
- Fixed variable declaration ordering (reverse xmas tree) and updated
variable naming to vref_mV (SI unit exception).
- Optimized GPIO reset logic using GPIOD_OUT_HIGH.
- Link to v2: https://lore.kernel.org/r/20260731-ti-ads112c04-driver-v2-0-aab0168c3c01@gmail.com
Changes in v2:
- Replaced `vref-supply` with `refp-supply` and `refn-supply` to accurately reflect hardware.
- Refactored the driver to dynamically parse channel configurations and routing from DT child nodes.
- Modernized the driver using kernel macros.
- Handled endianness elegantly.
- Added hardware reset fallback logic.
- Inherited IRQ trigger type from device tree instead of hardcoding.
- Fixed a bug where the MUX software cache could desync from hardware if the I2C write failed.
- Added strict return value checking for all I2C writes during probe.
- Updated the `i2c_device_id` array to use C99 named initializers.
- Link to v1: https://lore.kernel.org/r/20260728-ti-ads112c04-driver-v1-0-475efe4e2b78@gmail.com
---
Kyle Hsieh (2):
dt-bindings: iio: adc: ti,ads112c04: Add binding for ADS112C04
iio: adc: ti-ads112c04: Add support for TI ADS112C04
.../devicetree/bindings/iio/adc/ti,ads112c04.yaml | 146 +++++++
drivers/iio/adc/Kconfig | 10 +
drivers/iio/adc/Makefile | 1 +
drivers/iio/adc/ti-ads112c04.c | 423 +++++++++++++++++++++
4 files changed, 580 insertions(+)
---
base-commit: 4539944e515183668109bdf4d0c3d7d228383d88
change-id: 20260724-ti-ads112c04-driver-be7e89047834
Best regards,
--
Kyle Hsieh <kylehsieh1995@gmail.com>
On 05/08/2026 07:38, Kyle Hsieh wrote: > This patch series introduces support for the Texas Instruments ADS112C04 > Analog-to-Digital Converters. > > The ADS112C04 (16-bit) is precision, low-power, delta-sigma ADCs with > an I2C interface. They feature a flexible input multiplexer supporting > single-ended and differential measurements, a programmable gain amplifier, > and an internal voltage reference. > > Note: While this chip shares similarities with the ADS112C14 (currently > being upstreamed by David Lechner), the register maps and feature sets > are sufficiently different to warrant a separate driver. However, the > DT bindings and channel parsing logic have been aligned with the > ADS112C14 conventions. > > This initial submission provides a minimal feature set (single-shot > conversions and basic DRDY interrupt) covering current use cases. > > Signed-off-by: Kyle Hsieh <kylehsieh1995@gmail.com> > --- > Changes in v3: > - dt-bindings: iio: adc: ti,ads112c04: > - Resolved dt_binding_check errors by removing redundant $ref for > standard unit suffixes and fixing YAML array syntax. Yet you still decided NOT TO TEST it before sending. Best regards, Krzysztof
On 05/08/2026 08:43, Krzysztof Kozlowski wrote: > On 05/08/2026 07:38, Kyle Hsieh wrote: >> This patch series introduces support for the Texas Instruments ADS112C04 >> Analog-to-Digital Converters. >> >> The ADS112C04 (16-bit) is precision, low-power, delta-sigma ADCs with >> an I2C interface. They feature a flexible input multiplexer supporting >> single-ended and differential measurements, a programmable gain amplifier, >> and an internal voltage reference. >> >> Note: While this chip shares similarities with the ADS112C14 (currently >> being upstreamed by David Lechner), the register maps and feature sets >> are sufficiently different to warrant a separate driver. However, the >> DT bindings and channel parsing logic have been aligned with the >> ADS112C14 conventions. >> >> This initial submission provides a minimal feature set (single-shot >> conversions and basic DRDY interrupt) covering current use cases. >> >> Signed-off-by: Kyle Hsieh <kylehsieh1995@gmail.com> >> --- >> Changes in v3: >> - dt-bindings: iio: adc: ti,ads112c04: >> - Resolved dt_binding_check errors by removing redundant $ref for >> standard unit suffixes and fixing YAML array syntax. > Yet you still decided NOT TO TEST it before sending. Although after further looking this could be using properties added in iio tree, thus bot's report about failure. Well, if that is the case, that's unfortunate because if previous versions were not tested by you, this one cannot be tested by the bot, thus I look at this one as also untested. Best regards, Krzysztof
On Wed, Aug 5, 2026 at 2:46 PM Krzysztof Kozlowski <krzk@kernel.org> wrote: > > On 05/08/2026 08:43, Krzysztof Kozlowski wrote: > > On 05/08/2026 07:38, Kyle Hsieh wrote: > >> This patch series introduces support for the Texas Instruments ADS112C04 > >> Analog-to-Digital Converters. > >> > >> The ADS112C04 (16-bit) is precision, low-power, delta-sigma ADCs with > >> an I2C interface. They feature a flexible input multiplexer supporting > >> single-ended and differential measurements, a programmable gain amplifier, > >> and an internal voltage reference. > >> > >> Note: While this chip shares similarities with the ADS112C14 (currently > >> being upstreamed by David Lechner), the register maps and feature sets > >> are sufficiently different to warrant a separate driver. However, the > >> DT bindings and channel parsing logic have been aligned with the > >> ADS112C14 conventions. > >> > >> This initial submission provides a minimal feature set (single-shot > >> conversions and basic DRDY interrupt) covering current use cases. > >> > >> Signed-off-by: Kyle Hsieh <kylehsieh1995@gmail.com> > >> --- > >> Changes in v3: > >> - dt-bindings: iio: adc: ti,ads112c04: > >> - Resolved dt_binding_check errors by removing redundant $ref for > >> standard unit suffixes and fixing YAML array syntax. > > Yet you still decided NOT TO TEST it before sending. > > Although after further looking this could be using properties added in > iio tree, thus bot's report about failure. > > Well, if that is the case, that's unfortunate because if previous > versions were not tested by you, this one cannot be tested by the bot, > thus I look at this one as also untested. > > Best regards, > Krzysztof Hi Krzysztof, Thank you for the review and for following up in your second email. I would like to clarify that I did indeed test v3 locally with `make dt_binding_check` before submitting, and it passed without any warnings on my end. As you accurately pointed out in your follow-up, the CI bot failure appears to be a cross-tree dependency issue. I apologize for not explicitly noting this IIO tree dependency in the cover letter to prevent the bot's confusion. I have also just updated my local `dtschema` tool directly from the devicetree-org GitHub master branch, and running `make dt_binding_check` on my tree still completes silently with zero errors. Best regards, Kyle Hsieh
On 8/5/26 2:44 AM, Kyle Hsieh wrote: > On Wed, Aug 5, 2026 at 2:46 PM Krzysztof Kozlowski <krzk@kernel.org> wrote: >> >> On 05/08/2026 08:43, Krzysztof Kozlowski wrote: >>> On 05/08/2026 07:38, Kyle Hsieh wrote: >>>> This patch series introduces support for the Texas Instruments ADS112C04 >>>> Analog-to-Digital Converters. >>>> >>>> The ADS112C04 (16-bit) is precision, low-power, delta-sigma ADCs with >>>> an I2C interface. They feature a flexible input multiplexer supporting >>>> single-ended and differential measurements, a programmable gain amplifier, >>>> and an internal voltage reference. >>>> >>>> Note: While this chip shares similarities with the ADS112C14 (currently >>>> being upstreamed by David Lechner), the register maps and feature sets >>>> are sufficiently different to warrant a separate driver. However, the >>>> DT bindings and channel parsing logic have been aligned with the >>>> ADS112C14 conventions. >>>> >>>> This initial submission provides a minimal feature set (single-shot >>>> conversions and basic DRDY interrupt) covering current use cases. >>>> >>>> Signed-off-by: Kyle Hsieh <kylehsieh1995@gmail.com> >>>> --- >>>> Changes in v3: >>>> - dt-bindings: iio: adc: ti,ads112c04: >>>> - Resolved dt_binding_check errors by removing redundant $ref for >>>> standard unit suffixes and fixing YAML array syntax. >>> Yet you still decided NOT TO TEST it before sending. >> >> Although after further looking this could be using properties added in >> iio tree, thus bot's report about failure. >> >> Well, if that is the case, that's unfortunate because if previous >> versions were not tested by you, this one cannot be tested by the bot, >> thus I look at this one as also untested. >> >> Best regards, >> Krzysztof > Hi Krzysztof, > > Thank you for the review and for following up in your second email. > I would like to clarify that I did indeed test v3 locally with `make > dt_binding_check` > before submitting, and it passed without any warnings on my end. > > As you accurately pointed out in your follow-up, the CI bot failure > appears to be > a cross-tree dependency issue. I apologize for not explicitly noting > this IIO tree > dependency in the cover letter to prevent the bot's confusion. > > I have also just updated my local `dtschema` tool directly from the > devicetree-org > GitHub master branch, and running `make dt_binding_check` on my tree still > completes silently with zero errors. > > Best regards, > Kyle Hsieh I already replied to the bot message before I saw this thread. The problem is the base-commit: in the cover letter. I'm guessing that you did `b4 prep --edit-deps` at some point and pointed it to something other than the actual tree you are working from. That would explain why the test passes locally but not with the bot.
© 2016 - 2026 Red Hat, Inc.