lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250706103354.0059d320@jic23-huawei>
Date: Sun, 6 Jul 2025 10:33:54 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Jonathan Santos <jonath4nns@...il.com>
Cc: aEwd4cS7j0Vvypg8@...le.fi.intel.com, Andy Shevchenko
 <andriy.shevchenko@...el.com>, Jonathan Santos
 <Jonathan.Santos@...log.com>, linux-iio@...r.kernel.org,
 devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
 linux-gpio@...r.kernel.org, andy@...nel.org, nuno.sa@...log.com,
 Michael.Hennerich@...log.com, marcelo.schmitt@...log.com, robh@...nel.org,
 krzk+dt@...nel.org, conor+dt@...nel.org, marcelo.schmitt1@...il.com,
 linus.walleij@...aro.org, brgl@...ev.pl, lgirdwood@...il.com,
 broonie@...nel.org, dlechner@...libre.com
Subject: Re: [PATCH v11 11/11] iio: adc: ad7768-1: add low pass -3dB cutoff
 attribute

On Tue, 17 Jun 2025 13:17:05 -0300
Jonathan Santos <jonath4nns@...il.com> 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.
> 
> > > +};  
> > 
> > ...
> >   
> > > +	case IIO_CHAN_INFO_LOW_PASS_FILTER_3DB_FREQUENCY:
> > > +		temp = st->samp_freq * ad7768_filter_3db_odr_multiplier[st->filter_type];
> > > +		*val = DIV_ROUND_CLOSEST(temp, 1000);  
> > 
> > MILLI? KILO/ MICRO/MILLI? ...?
> >   
> 
> Yes, MILLI.
I fixed this up and added units.h include and applied.


> 
> Thanks,
> Jonathan S.
> 
> > -- 
> > With Best Regards,
> > Andy Shevchenko
> > 
> >   
> 


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ