Re: [PATCH v8 10/11] iio: adc: ad7768-1: add filter type and oversampling ratio attributes
From: Jonathan Santos
Date: Mon May 19 2025 - 18:31:46 EST
On 05/19, David Lechner wrote:
> On 5/19/25 12:13 PM, Jonathan Santos wrote:
> > On 05/15, Jonathan Santos wrote:
>
> ...
> >> +
> >> +/* Decimation Rate range for each filter type */
> >> +static const int ad7768_dec_rate_range[][3] = {
> >> + [AD7768_FILTER_SINC5] = { 8, 8, 1024 },
> >> + [AD7768_FILTER_SINC3] = { 32, 32, 163840 },
> >> + [AD7768_FILTER_WIDEBAND] = { 32, 32, 1024 },
> >> + [AD7768_FILTER_SINC3_REJ60] = { 32, 32, 163840 },
> >> +};
> >> +
> >
> > Since we're still discussing some points — is the `step` in
> > `[min step max]` for the IIO range additive or multiplicative? It is not
> > clear on documentation, maybe on purpose or I have missed something.
> >
> > Here, decimation/OSR doubles from 8 or 32 for SINC5/WIDEBAND, and is a
> > multiple of 32 for SINC3. So I'm still unsure how to represent this to be
> > clear to the user.
>
> Sounds to me like sinc5/wideband should be lists instead of ranges.
> It is only 6 values.
So can we mix lists and ranges for the same attribute? I see that this
is not usual.
>
>