From: Ajith Anandhan <ajithanandhan0406@gmail.com>
To: jic23@kernel.org
Cc: dlechner@baylibre.com, nuno.sa@analog.com, andy@kernel.org,
robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Ajith Anandhan <ajithanandhan0406@gmail.com>
Subject: [PATCH v2 0/2] iio: adc: ti-ads1120: Add driver and dt-binding
Date: Sun, 9 Nov 2025 19:41:17 +0530 [thread overview]
Message-ID: <20251109141119.561756-1-ajithanandhan0406@gmail.com> (raw)
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
--
2.34.1
next reply other threads:[~2025-11-09 14:11 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-09 14:11 Ajith Anandhan [this message]
2025-11-09 14:11 ` [PATCH v2 1/2] dt-bindings: iio: adc: Add TI ADS1120 binding Ajith Anandhan
2025-11-10 7:59 ` Krzysztof Kozlowski
2025-11-15 18:31 ` Jonathan Cameron
2025-11-18 0:19 ` David Lechner
2025-11-09 14:11 ` [PATCH v2 2/2] iio: adc: Add support for TI ADS1120 Ajith Anandhan
2025-11-09 17:03 ` Andy Shevchenko
2025-11-09 17:05 ` Andy Shevchenko
2025-11-10 10:17 ` kernel test robot
2025-11-15 18:45 ` Jonathan Cameron
2025-11-18 14:04 ` David Lechner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20251109141119.561756-1-ajithanandhan0406@gmail.com \
--to=ajithanandhan0406@gmail.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).