mbox series

[00/11] iio: adc: ad7606: improvements and ad7606c parallel interface support

Message ID 20250312-iio-adc-ad7606-improvements-v1-0-d1ec04847aea@baylibre.com (mailing list archive)
Headers show
Series iio: adc: ad7606: improvements and ad7606c parallel interface support | expand

Message

David Lechner March 13, 2025, 1:15 a.m. UTC
The main purpose of this series is to add support for the AD7606C chips
using a parallel interface. Along the way quite a few improvements were
made to the driver which in the end made adding the additional chips
trivial.

The first 3 patches are fixes. The next 6 are some minor cleanups. The
2nd to last patch is the big one. As explained in the respective commit
message, the channel data structures were getting out of hand and only
going to get worse with the addition of SPI offload support. Instead, we
are opting to dynamically allocate the channel data structures to avoid
a bunch of the existing complexity in the driver.

I have limited access to hardware, so I was only able to test this with
ad7606c-18.

Signed-off-by: David Lechner <dlechner@baylibre.com>
---
David Lechner (11):
      iio: adc: ad7606_spi: check error in ad7606B_sw_mode_config()
      iio: adc: ad7606: check for NULL before calling sw_mode_config()
      iio: adc: ad7606: fix scales_available attributes
      iio: adc: ad7606: add missing max sample rates
      iio: adc: ad7606: use devm_mutex_init()
      iio: adc: ad7606: fix kernel-doc comments
      iio: adc: ad7606: use kernel identifier name style
      iio: adc: ad7606: don't use address field
      iio: adc: ad7606: drop ch param from ad7606_scale_setup_cb_t
      iio: adc: ad7606: dynamically allocate channel info
      iio: adc: ad7606_par: add ad7606c chips

 drivers/iio/adc/ad7606.c     | 313 ++++++++++++++++++++-----------------------
 drivers/iio/adc/ad7606.h     | 171 +++++++----------------
 drivers/iio/adc/ad7606_par.c |  37 +----
 drivers/iio/adc/ad7606_spi.c |  98 ++------------
 4 files changed, 211 insertions(+), 408 deletions(-)
---
base-commit: 97fe5f8a4299e4b8601ecb62c9672c27f2d2ccce
change-id: 20250311-iio-adc-ad7606-improvements-997d7af218e3

Best regards,

Comments

Nuno Sá March 13, 2025, 9:11 p.m. UTC | #1
On Wed, 2025-03-12 at 20:15 -0500, David Lechner wrote:
> The main purpose of this series is to add support for the AD7606C chips
> using a parallel interface. Along the way quite a few improvements were
> made to the driver which in the end made adding the additional chips
> trivial.
> 
> The first 3 patches are fixes. The next 6 are some minor cleanups. The
> 2nd to last patch is the big one. As explained in the respective commit
> message, the channel data structures were getting out of hand and only
> going to get worse with the addition of SPI offload support. Instead, we
> are opting to dynamically allocate the channel data structures to avoid
> a bunch of the existing complexity in the driver.
> 
> I have limited access to hardware, so I was only able to test this with
> ad7606c-18.
> 
> Signed-off-by: David Lechner <dlechner@baylibre.com>
> ---

Reviewed-by: Nuno Sá <nuno.sa@analog.com>

> David Lechner (11):
>       iio: adc: ad7606_spi: check error in ad7606B_sw_mode_config()
>       iio: adc: ad7606: check for NULL before calling sw_mode_config()
>       iio: adc: ad7606: fix scales_available attributes
>       iio: adc: ad7606: add missing max sample rates
>       iio: adc: ad7606: use devm_mutex_init()
>       iio: adc: ad7606: fix kernel-doc comments
>       iio: adc: ad7606: use kernel identifier name style
>       iio: adc: ad7606: don't use address field
>       iio: adc: ad7606: drop ch param from ad7606_scale_setup_cb_t
>       iio: adc: ad7606: dynamically allocate channel info
>       iio: adc: ad7606_par: add ad7606c chips
> 
>  drivers/iio/adc/ad7606.c     | 313 ++++++++++++++++++++-----------------------
>  drivers/iio/adc/ad7606.h     | 171 +++++++----------------
>  drivers/iio/adc/ad7606_par.c |  37 +----
>  drivers/iio/adc/ad7606_spi.c |  98 ++------------
>  4 files changed, 211 insertions(+), 408 deletions(-)
> ---
> base-commit: 97fe5f8a4299e4b8601ecb62c9672c27f2d2ccce
> change-id: 20250311-iio-adc-ad7606-improvements-997d7af218e3
> 
> Best regards,