From: Jonathan Cameron <jic23@kernel.org>
To: Jonathan Santos <Jonathan.Santos@analog.com>
Cc: <linux-iio@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <Michael.Hennerich@analog.com>,
<dlechner@baylibre.com>, <nuno.sa@analog.com>, <andy@kernel.org>,
<robh@kernel.org>, <krzk+dt@kernel.org>, <conor+dt@kernel.org>,
<jonath4nns@gmail.com>
Subject: Re: [PATCH 2/4] iio: adc: ad7768-1: introduce chip info for future multidevice support
Date: Sat, 16 Aug 2025 14:16:40 +0100 [thread overview]
Message-ID: <20250816141640.4059d337@jic23-huawei> (raw)
In-Reply-To: <22ea35425827176a842ea0e523040acd20e27bcc.1754617360.git.Jonathan.Santos@analog.com>
On Tue, 12 Aug 2025 23:48:57 -0300
Jonathan Santos <Jonathan.Santos@analog.com> wrote:
> Add Chip info struct in SPI device to store channel information for
> each supported part.
>
> Signed-off-by: Jonathan Santos <Jonathan.Santos@analog.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.
> +};
next prev parent reply other threads:[~2025-08-16 13:16 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-13 2:48 [PATCH 0/4] Add support for ADAQ776x-1 ADC Family Jonathan Santos
2025-08-13 2:48 ` [PATCH 1/4] dt-bindings: iio: adc: ad7768-1: add new supported parts Jonathan Santos
2025-08-13 8:27 ` Krzysztof Kozlowski
2025-08-13 22:39 ` Jonathan Santos
2025-08-14 6:03 ` Krzysztof Kozlowski
2025-08-16 13:12 ` Jonathan Cameron
2025-08-18 21:04 ` Jonathan Santos
2025-08-19 6:39 ` Krzysztof Kozlowski
2025-08-19 18:01 ` Marcelo Schmitt
2025-08-13 2:48 ` [PATCH 2/4] iio: adc: ad7768-1: introduce chip info for future multidevice support Jonathan Santos
2025-08-13 10:37 ` Andy Shevchenko
2025-08-16 13:16 ` Jonathan Cameron [this message]
2025-08-13 2:49 ` [PATCH 3/4] iio: adc: ad7768-1: use devm_regulator_get_enable_read_voltage Jonathan Santos
2025-08-13 10:39 ` Andy Shevchenko
2025-08-13 14:50 ` David Lechner
2025-08-14 6:43 ` Nuno Sá
2025-08-19 18:06 ` Marcelo Schmitt
2025-08-13 2:49 ` [PATCH 4/4] iio: adc: ad7768-1: add support for ADAQ776x-1 ADC Family Jonathan Santos
2025-08-13 12:16 ` Andy Shevchenko
2025-08-13 23:21 ` kernel test robot
2025-08-14 6:55 ` Nuno Sá
2025-08-18 21:53 ` Jonathan Santos
2025-08-19 19:14 ` Marcelo Schmitt
2025-08-19 20:09 ` Andy Shevchenko
2025-08-14 6:42 ` [PATCH 0/4] Add " Nuno Sá
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250816141640.4059d337@jic23-huawei \
--to=jic23@kernel.org \
--cc=Jonathan.Santos@analog.com \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jonath4nns@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox