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] [day] [month] [year] [list]
Message-ID: <20250816141640.4059d337@jic23-huawei>
Date: Sat, 16 Aug 2025 14:16:40 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Jonathan Santos <Jonathan.Santos@...log.com>
Cc: <linux-iio@...r.kernel.org>, <devicetree@...r.kernel.org>,
 <linux-kernel@...r.kernel.org>, <Michael.Hennerich@...log.com>,
 <dlechner@...libre.com>, <nuno.sa@...log.com>, <andy@...nel.org>,
 <robh@...nel.org>, <krzk+dt@...nel.org>, <conor+dt@...nel.org>,
 <jonath4nns@...il.com>
Subject: Re: [PATCH 2/4] iio: adc: ad7768-1: introduce chip info for future
 multidevice support

On Tue, 12 Aug 2025 23:48:57 -0300
Jonathan Santos <Jonathan.Santos@...log.com> wrote:

> Add Chip info struct in SPI device to store channel information for
> each supported part.
> 
> Signed-off-by: Jonathan Santos <Jonathan.Santos@...log.com>
Some minor comments

> ---
>  drivers/iio/adc/ad7768-1.c | 76 ++++++++++++++++++++++++++------------
>  1 file changed, 53 insertions(+), 23 deletions(-)
> 
> diff --git a/drivers/iio/adc/ad7768-1.c b/drivers/iio/adc/ad7768-1.c
> index a2e061f0cb08..36ba208fc119 100644
> --- a/drivers/iio/adc/ad7768-1.c
> +++ b/drivers/iio/adc/ad7768-1.c
> @@ -106,6 +106,7 @@
>  #define AD7768_GPIO_READ_MSK		GENMASK(3, 0)
>  
>  #define AD7768_VCM_OFF			0x07
> +#define AD7768_CHAN_INFO_NONE		0

I'm not convinced this is worthwhile vs 0 which is fairly obviously
a 'nothing to see here' value.

>  
>  #define AD7768_TRIGGER_SOURCE_SYNC_IDX 0
>  
> @@ -213,6 +214,13 @@ static const struct iio_scan_type ad7768_scan_type[] = {
>  	},
>  };
>  
> +struct ad7768_chip_info {
> +	const char *name;
> +	const struct iio_chan_spec *channel_spec;
> +	const unsigned long *available_masks;
> +	int num_channels;

I guess hole concerns pushed num_channels after the pointers.
That's fine but if you move available_masks up one line, then
we can still have channel_spec and the thing that says
how bit it is next to each other.

> +};

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ