[PATCH v2 0/6] iio: adc: ad7124: add filter support

David Lechner posted 6 patches 2 weeks, 6 days ago
Documentation/ABI/testing/sysfs-bus-iio |   1 +
drivers/iio/adc/ad7124.c                | 383 +++++++++++++++++++++++++-------
2 files changed, 299 insertions(+), 85 deletions(-)
[PATCH v2 0/6] iio: adc: ad7124: add filter support
Posted by David Lechner 2 weeks, 6 days ago
The AD7124 family of chips supports a number of different filter modes.
This series eventually gets around to adding support for selecting the
filter mode at runtime after first doing some cleanups to the existing
code.

The first 3 patches are just updating things to use newer APIs.

The 4th patch is addressing a shortcoming in the driver where the
sampling_frequency attributes were being limited to an integer value.

The 5th patch is the one that finally adds support for filter_type
and filter_type_available attributes.

And the last patch documents one new filter_type that was used that we
haven't seen before.

This applies on top of "[PATCH v4] iio: adc: ad7124: fix sample rate for
multi-channel use"

---
Changes in v2:
- Rebased on v4 depedendency.
- Added divisor local variable.
- Link to v1: https://lore.kernel.org/r/20250905-iio-adc-ad7124-add-filter-support-v1-0-aee3834be6a9@baylibre.com

---
David Lechner (6):
      iio: adc: ad7124: use clamp()
      iio: adc: ad7124: use read_avail() for scale_available
      iio: adc: ad7124: use guard(mutex) to simplify return paths
      iio: adc: ad7124: support fractional sampling_frequency
      iio: adc: ad7124: add filter support
      iio: ABI: document "sinc4+rej60" filter_type

 Documentation/ABI/testing/sysfs-bus-iio |   1 +
 drivers/iio/adc/ad7124.c                | 383 +++++++++++++++++++++++++-------
 2 files changed, 299 insertions(+), 85 deletions(-)
---
base-commit: b8902d55155cec7bd743dc1129e0b32e70b1751f
change-id: 20250725-iio-adc-ad7124-add-filter-support-d1c9e53f64b5
prerequisite-message-id: 20250910-iio-adc-ad7124-fix-samp-freq-for-multi-channel-v4-1-8ca624c6114c@baylibre.com
prerequisite-patch-id: 780ed21c461fc7629b4eab73bede62a02e771379

Best regards,
-- 
David Lechner <dlechner@baylibre.com>
Re: [PATCH v2 0/6] iio: adc: ad7124: add filter support
Posted by Andy Shevchenko 2 weeks, 6 days ago
On Fri, Sep 12, 2025 at 12:42 AM David Lechner <dlechner@baylibre.com> wrote:
>
> The AD7124 family of chips supports a number of different filter modes.
> This series eventually gets around to adding support for selecting the
> filter mode at runtime after first doing some cleanups to the existing
> code.
>
> The first 3 patches are just updating things to use newer APIs.
>
> The 4th patch is addressing a shortcoming in the driver where the
> sampling_frequency attributes were being limited to an integer value.
>
> The 5th patch is the one that finally adds support for filter_type
> and filter_type_available attributes.
>
> And the last patch documents one new filter_type that was used that we
> haven't seen before.
>
> This applies on top of "[PATCH v4] iio: adc: ad7124: fix sample rate for
> multi-channel use"

For non-commented patches
Reviewed-by: Andy Shevchenko <andy@kernel.org>

-- 
With Best Regards,
Andy Shevchenko
Re: [PATCH v2 0/6] iio: adc: ad7124: add filter support
Posted by Jonathan Cameron 2 weeks, 5 days ago
On Fri, 12 Sep 2025 07:50:39 +0300
Andy Shevchenko <andy.shevchenko@gmail.com> wrote:

> On Fri, Sep 12, 2025 at 12:42 AM David Lechner <dlechner@baylibre.com> wrote:
> >
> > The AD7124 family of chips supports a number of different filter modes.
> > This series eventually gets around to adding support for selecting the
> > filter mode at runtime after first doing some cleanups to the existing
> > code.
> >
> > The first 3 patches are just updating things to use newer APIs.
> >
> > The 4th patch is addressing a shortcoming in the driver where the
> > sampling_frequency attributes were being limited to an integer value.
> >
> > The 5th patch is the one that finally adds support for filter_type
> > and filter_type_available attributes.
> >
> > And the last patch documents one new filter_type that was used that we
> > haven't seen before.
> >
> > This applies on top of "[PATCH v4] iio: adc: ad7124: fix sample rate for
> > multi-channel use"  
> 
> For non-commented patches
> Reviewed-by: Andy Shevchenko <andy@kernel.org>
> 

There was a bit of fuzz on patch 6 but resolution looks good to me.
So applied whole series to the togreg branch of iio.git which I'll briefly
push out as testing.