[PATCH v2 0/8] Add SPI offload support to AD4030

Marcelo Schmitt posted 8 patches 1 week, 6 days ago
There is a newer version of this series
.../bindings/iio/adc/adi,ad4030.yaml          |  71 +-
Documentation/iio/ad4030.rst                  |  35 +
drivers/iio/adc/Kconfig                       |   3 +
drivers/iio/adc/ad4030.c                      | 718 ++++++++++++++++--
4 files changed, 774 insertions(+), 53 deletions(-)
[PATCH v2 0/8] Add SPI offload support to AD4030
Posted by Marcelo Schmitt 1 week, 6 days ago
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'.

Except for a couple of comments on the SPI offload patch, I believe I have
applied all suggestions to v1.

Change log v1 -> v2
[IIO Docs]
- Swapped PWM numbering.
- Expanded double PWM description and capture zone description.
[device tree]
- Dropped pwm-names since only one PWM signal is directly requested by the ADC.
- Use pattern to specify devices that require gain related properties.
- Disallow gain related properties for devices that don't come with embedded PGA.
- Documented VDDH and VDD_FDA supplies for ADAQ4216 and ADAQ4224.
- Updated PGA gain constants.
[IIO]
- Dropped all clock-modes and DDR related stuff for now as those will require
  further changes to the SPI subsystem or to SPI controller drivers.
- Update the modes register with proper output data mode bits when sample
  averaging (oversampling_ratio) is set.
- Lock on device state mutex before updating oversampling and sampling frequency.
- Made sampling_frequency shared by all channels.
- Better checking the requested sampling frequency is valid.
- Adjusted to SPI offload data capture preparation and stop procedures.
- Error out if try to get/set sampling frequency without offload trigger.
- Depend on PWM so build always succeed.
- Drop unmatched/unbalanced call to iio_device_release_direct().
- No longer shadowing error codes.
- Using BIT macro to make list of averaging options more readable.
- Updated PGA gain constants.
- De-duplicate 'ret == -EINVAL' check in PGA setup.
- Dropped redundant call to ad4030_set_pga_gain() on PGA GPIO setup.
- Better state struct field placement to avoid holes in data.
- Many minor readability and code style improvements.

The code was tested on a remote setup with ADAQ4216 connected to a ZedBoard
running Linux kernel 6.17.0-rc1 built from IIO tree testing branch.

Link to v1: https://lore.kernel.org/linux-iio/cover.1756511030.git.marcelo.schmitt@analog.com/

Best regards,
Marcelo

Marcelo Schmitt (8):
  iio: adc: ad4030: Fix _scale value for common-mode channels
  dt-bindings: iio: adc: adi,ad4030: Reference spi-peripheral-props
  Documentation: iio: ad4030: Add double PWM SPI offload doc
  dt-bindings: iio: adc: adi,ad4030: Add PWM
  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          |  71 +-
 Documentation/iio/ad4030.rst                  |  35 +
 drivers/iio/adc/Kconfig                       |   3 +
 drivers/iio/adc/ad4030.c                      | 718 ++++++++++++++++--
 4 files changed, 774 insertions(+), 53 deletions(-)


base-commit: 561285d048053fec8a3d6d1e3ddc60df11c393a0
-- 
2.50.1