Add SPI offload support to AD4030
From: | Marcelo Schmitt <marcelo.schmitt-AT-analog.com> | |
To: | <linux-iio-AT-vger.kernel.org>, <devicetree-AT-vger.kernel.org>, <linux-doc-AT-vger.kernel.org>, <linux-spi-AT-vger.kernel.org>, <linux-kernel-AT-vger.kernel.org> | |
Subject: | [PATCH v3 0/8] Add SPI offload support to AD4030 | |
Date: | Fri, 26 Sep 2025 17:37:48 -0300 | |
Message-ID: | <cover.1758916484.git.marcelo.schmitt@analog.com> | |
Cc: | <jic23-AT-kernel.org>, <michael.hennerich-AT-analog.com>, <nuno.sa-AT-analog.com>, <eblanc-AT-baylibre.com>, <dlechner-AT-baylibre.com>, <andy-AT-kernel.org>, <robh-AT-kernel.org>, <krzk+dt-AT-kernel.org>, <conor+dt-AT-kernel.org>, <corbet-AT-lwn.net>, <marcelo.schmitt1-AT-gmail.com> | |
Archive-link: | Article |
Hi, This patch series add support for high sample rate data acquisition with AD4030 and similar devices. The last couple patches in the series add support for ADAQ4216 and ADAQ4224 which are similar to AD4030, but have a PGA in front of the ADC input. The patches to the SPI subsystem were submitted in a separate patch series titled 'Add SPI offload trigger offset'. Link: https://lore.kernel.org/linux-spi/d73804d605d494c6420adb7... Change log v2 -> v3 [device tree] - Picked up reviewed-by tags. - PGA gain now described in decibels. [IIO Docs] - Picked up reviewed-by tags - Updated AD4030 documentation with link to a working project that supports double PWM setup. [IIO] - Dropped "Fix _scale value for common-mode channels" patch accepted in v2. - Dropped Nuno's and Sergiu's co-developed-by tags as suggested by Nuno. - No longer shadowing original error on ad4030_offload_buffer_postenable(). - Reduced transfer speed for register access. (new patch) - Select SPI_OFFLOAD_TRIGGER_PWM instead of depending on PWM. - Renamed __ad4030_set_sampling_freq() to ad4030_update_conversion_rate(). - Dropped st->mode check in ad4030_update_conversion_rate(). - Dropped ad4030_state mutex lock. - Let SPI offload transfers run at the max speed specified in device tree. - Don't round offload transfer bits_per_word to power of two. - Take common-mode data size into account for offload xfer bits_per_word. - Disallowed SPI offload for 2 channel interleaved mode. - ADAQ patch updated to handle PGA specified in decibels. The code was tested on a remote setup with ADAQ4216 connected to a ZedBoard running Linux kernel 6.17.0-rc7 built from SPI tree for-next branch. Link to v1: https://lore.kernel.org/linux-iio/cover.1756511030.git.ma... Link to v2: https://lore.kernel.org/linux-iio/cover.1758214628.git.ma... Best regards, Marcelo Marcelo Schmitt (8): dt-bindings: iio: adc: adi,ad4030: Reference spi-peripheral-props Docs: iio: ad4030: Add double PWM SPI offload doc dt-bindings: iio: adc: adi,ad4030: Add PWM iio: adc: ad4030: Reduce register access transfer speed iio: adc: ad4030: Use BIT macro to improve code readability iio: adc: ad4030: Add SPI offload support dt-bindings: iio: adc: adi,ad4030: Add ADAQ4216 and ADAQ4224 iio: adc: ad4030: Add support for ADAQ4216 and ADAQ4224 .../bindings/iio/adc/adi,ad4030.yaml | 90 ++- Documentation/iio/ad4030.rst | 39 + drivers/iio/adc/Kconfig | 3 + drivers/iio/adc/ad4030.c | 750 ++++++++++++++++-- 4 files changed, 826 insertions(+), 56 deletions(-) base-commit: 561285d048053fec8a3d6d1e3ddc60df11c393a0 -- 2.39.2