Re: [PATCH v11 11/11] iio: adc: ad7768-1: add low pass -3dB cutoff attribute

From: Andy Shevchenko
Date: Tue Jun 17 2025 - 16:18:26 EST


On Tue, Jun 17, 2025 at 7:17 PM Jonathan Santos <jonath4nns@xxxxxxxxx> wrote:
> On 06/13, Andy Shevchenko wrote:
> > On Wed, Jun 11, 2025 at 08:52:03AM -0300, Jonathan Santos wrote:
> > > Ad7768-1 has a different -3db frequency multiplier depending on
> > > the filter type configured. The cutoff frequency also varies according
> > > to the current ODR.
> > >
> > > Add a readonly low pass -3dB frequency cutoff attribute to clarify to
> > > the user which bandwidth is being allowed depending on the filter
> > > configurations.
> >
> > > +/* -3dB cutoff frequency multipliers (relative to ODR) for each filter type. */
> > > +static const int ad7768_filter_3db_odr_multiplier[] = {
> > > + [AD7768_FILTER_SINC5] = 204, /* 0.204 */
> > > + [AD7768_FILTER_SINC3] = 262, /* 0.2617 */
> > > + [AD7768_FILTER_SINC3_REJ60] = 262, /* 0.2617 */
> > > + [AD7768_FILTER_WIDEBAND] = 433, /* 0.433 */
> >
> > Just to be sure, is it 0.433 or 0.4333(3) actually? Sometimes datasheets have
> > rounding that even may lead to problems (see TSC issues for some of the Intel
> > CPUs in the past). That's behind my question.
>
> Every reference I have specifies it as 0.433, so I believe that is it.

Yeah, I see now. The base is 0.10825, which is multiplied by 4 in this case.

> > > +};

--
With Best Regards,
Andy Shevchenko