Re: [PATCH v1 1/1] iio: adc: ad7192: Refactor filter config
From: David Lechner
Date: Thu May 01 2025 - 10:49:33 EST
On 4/26/25 7:32 AM, Jonathan Cameron wrote:
> On Fri, 25 Apr 2025 10:43:29 -0500
> David Lechner <dlechner@xxxxxxxxxxxx> wrote:
>
>> On 4/25/25 8:20 AM, Alisa-Dariana Roman wrote:
...
>>> +static const char *const ad7192_filter_modes_str[] = {
>>> + [AD7192_FILTER_SINC4] = "sinc4",
>>> + [AD7192_FILTER_SINC3] = "sinc3",
>>> + [AD7192_FILTER_SINC4_CHOP] = "sinc4+chop",
>
> Is chop really a filter? I had to look it up and to me at least it
> seems like it isn't even though one thing it does is remove
> some types of noise. It also removes linear offsets (some types
> of filter kind of do that, but the affect of chop smells more like
> a calibration tweak than a filter)
>
> Maybe we need a separate control for chop, rather than trying to
> force it through our already complex filter type attributes?
>
I was looking at the datasheet for another ADC that popped up on the mailing
list today. https://www.ti.com/lit/ds/symlink/ads1262.pdf
It also has a chop mode and filters very similar to this one. So perhaps another
reason to make chop a separate bool attribute that could considered a "standard"
attribute.