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: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <aCcEXgd3My425JRV@smile.fi.intel.com>
Date: Fri, 16 May 2025 12:24:46 +0300
From: Andy Shevchenko <andy@...nel.org>
To: Jonathan Santos <Jonathan.Santos@...log.com>
Cc: linux-iio@...r.kernel.org, devicetree@...r.kernel.org,
	linux-kernel@...r.kernel.org, linux-gpio@...r.kernel.org,
	nuno.sa@...log.com, Michael.Hennerich@...log.com,
	marcelo.schmitt@...log.com, jic23@...nel.org, 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, jonath4nns@...il.com, dlechner@...libre.com
Subject: Re: [PATCH v8 07/11] iio: adc: ad7768-1: add multiple scan types to
 support 16-bits mode

On Thu, May 15, 2025 at 06:13:43PM -0300, Jonathan Santos wrote:
> When the device is configured to decimation x8, only possible in the
> sinc5 filter, output data is reduced to 16-bits in order to support
> 1 MHz of sampling frequency due to clock limitation.
> 
> Use multiple scan types feature to enable the driver to switch
> scan type at runtime, making it possible to support both 24-bit and
> 16-bit resolution.

...

> +static int ad7768_get_current_scan_type(const struct iio_dev *indio_dev,
> +					const struct iio_chan_spec *chan)
> +{
> +	struct ad7768_state *st = iio_priv(indio_dev);
> +
> +	return st->dec_rate == 8 ? AD7768_SCAN_TYPE_HIGH_SPEED :
> +		AD7768_SCAN_TYPE_NORMAL;

Besides issues with the indentation, the logical split seems to me better:

	return st->dec_rate == 8 ?
	       AD7768_SCAN_TYPE_HIGH_SPEED : AD7768_SCAN_TYPE_NORMAL;

> +}

But no need to resend just for this. Perhaps Jonathan can update.

-- 
With Best Regards,
Andy Shevchenko



Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ