Skip to content

iio: adc: ti-ads1120: Add driver and dt-binding

Ajith Anandhan linux-devicetree linux-iio lkml llvm oe-kbuild-all 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 17 repliesIn review
  2. v1 RFC3 patches 20 repliesSuperseded

Changes in v2 from the cover letter

=============
Driver improvements:
- Fixed all register bit definitions to use field values with FIELD_PREP/FIELD_GET
- Moved DMA buffer to end of struct with proper alignment
- Added comprehensive comments for mutex protection
- Used regmap framework for register access
- Added all 15 channels (differential, single-ended, diagnostic)
- Used guard(mutex) and cleanup.h for lock management
- Used devm_mutex_init() for proper resource management
- Fixed error handling with dev_err_probe() throughout
- Removed redundant state variables (gain, datarate cached in regmap)
- Used sign_extend32() and get_unaligned_be16() for data parsing
- Split SPI transfers for cleaner command/data separation
- Added GPL-2.0-only license identifier

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2dt-bindings: iio: adc: Add TI ADS1120 bindingDocumentation/devicetree/bindings/iio/adc/ti,ads1120.yaml+109 -05 replies
2/2iio: adc: Add support for TI ADS1120MAINTAINERS drivers/iio/adc/Kconfig drivers/iio/adc/Makefile +1 more+649 -012 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2] iio: adc: ti-ads1120: Add driver and dt-binding

This patch adds support for the Texas Instruments ADS1120, a precision 16-bit delta-sigma ADC with SPI interface.

Why a new driver?
=================
The ADS1120 requires a dedicated driver rather than extending existing TI ADC drivers for the following reasons:

ads124s08.c - TI ADS124S08

- This is the closest match (both are delta-sigma, SPI-based)

- However, significant differences exist:

* Different register layout (ADS124S08 has more registers)

* Different command set ADS124S08 has built-in MUX for differential
inputs
* Different register addressing and bit fields and conversion
timing and data retrieval.

would require extensive conditional code paths that might reduce maintainability for both devices. A separate, focused driver seemed cleaner.

Changes in v2
=============
Driver improvements:
- Fixed all register bit definitions to use field values with FIELD_PREP/FIELD_GET
- Moved DMA buffer to end of struct with proper alignment
- Added comprehensive comments for mutex protection
- Used regmap framework for register access
- Added all 15 channels (differential, single-ended, diagnostic)
- Used guard(mutex) and cleanup.h for lock management
- Used devm_mutex_init() for proper resource management
- Fixed error handling with dev_err_probe() throughout
- Removed redundant state variables (gain, datarate cached in regmap)
- Used sign_extend32() and get_unaligned_be16() for data parsing
- Split SPI transfers for cleaner command/data separation
- Added GPL-2.0-only license identifier

Device tree binding improvements:
- Added required avdd-supply property
- Added optional vref-supply for external reference
- Added interrupts and interrupt-names for DRDY pins
- Added optional clocks property for external clock
- Added ti,avdd-is-ref boolean flag for AVDD reference selection
- Added complete example with all optional properties
- Added datasheet link in binding description

Changes in v1 (RFC)
===================
- Initial RFC submission

Ajith Anandhan (2):
dt-bindings: iio: adc: Add TI ADS1120 binding
iio: adc: Add support for TI ADS1120

 .../bindings/iio/adc/ti,ads1120.yaml          | 110 +++
 MAINTAINERS                                   |   7 +
 drivers/iio/adc/Kconfig                       |  10 +
 drivers/iio/adc/Makefile                      |   1 +
 drivers/iio/adc/ti-ads1120.c                  | 631 ++++++++++++++++++
 5 files changed, 759 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/iio/adc/ti,ads1120.yaml
 create mode 100644 drivers/iio/adc/ti-ads1120.c
Signature · 1 line
2.34.1