[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20250607164428.7a245af5@jic23-huawei>
Date: Sat, 7 Jun 2025 16:44:28 +0100
From: Jonathan Cameron <jic23@...nel.org>
To: Pop Ioan Daniel <pop.ioan-daniel@...log.com>
Cc: Lars-Peter Clausen <lars@...afoo.de>, Michael Hennerich
<Michael.Hennerich@...log.com>, "David Lechner" <dlechner@...libre.com>,
Nuno Sá <nuno.sa@...log.com>, Andy Shevchenko
<andy@...nel.org>, Rob Herring <robh@...nel.org>, Krzysztof Kozlowski
<krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, Sergiu Cuciurean
<sergiu.cuciurean@...log.com>, "Dragos Bogdan" <dragos.bogdan@...log.com>,
Antoniu Miclaus <antoniu.miclaus@...log.com>, Olivier Moysan
<olivier.moysan@...s.st.com>, Javier Carrasco
<javier.carrasco.cruz@...il.com>, Matti Vaittinen
<mazziesaccount@...il.com>, Angelo Dureghello <adureghello@...libre.com>,
Guillaume Stols <gstols@...libre.com>, Tobias Sperling
<tobias.sperling@...ting.com>, Marcelo Schmitt
<marcelo.schmitt@...log.com>, Trevor Gamblin <tgamblin@...libre.com>,
Alisa-Dariana Roman <alisadariana@...il.com>, Ramona Alexandra Nechita
<ramona.nechita@...log.com>, Herve Codina <herve.codina@...tlin.com>,
AngeloGioacchino Del Regno <angelogioacchino.delregno@...labora.com>,
"Thomas Bonnefille" <thomas.bonnefille@...tlin.com>, João
Paulo Gonçalves <joao.goncalves@...adex.com>,
<linux-iio@...r.kernel.org>, <devicetree@...r.kernel.org>,
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v7 5/5] iio: adc: ad7405: add ad7405 driver
On Thu, 5 Jun 2025 18:09:43 +0300
Pop Ioan Daniel <pop.ioan-daniel@...log.com> wrote:
> Add support for the AD7405/ADUM770x, a high performance isolated ADC,
> 1-channel, 16-bit with a second-order Σ-Δ modulator that converts an
> analog input signal into a high speed, single-bit data stream.
>
> Signed-off-by: Pop Ioan Daniel <pop.ioan-daniel@...log.com>
Hi Pop,
Only one comment from me. I can tidy that up whilst applying but
given there were 3 versions and quite a bit of feedback in the last week
I'd like to give others time to take another look before picking this up.
If everyone is happy with it, I'll apply with tweak as below unless
you let me know you will be using different channel types in a follow
up series that you are going to post very soon?
Jonathan
> diff --git a/drivers/iio/adc/ad7405.c b/drivers/iio/adc/ad7405.c
> new file mode 100644
> index 000000000000..c07b90fbd429
> --- /dev/null
> +++ b/drivers/iio/adc/ad7405.c
> @@ -0,0 +1,259 @@
> +#define AD7405_IIO_CHANNEL { \
> + .type = IIO_VOLTAGE, \
> + .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE) | \
> + BIT(IIO_CHAN_INFO_OFFSET), \
> + .info_mask_shared_by_all = IIO_CHAN_INFO_SAMP_FREQ | \
> + BIT(IIO_CHAN_INFO_OVERSAMPLING_RATIO), \
> + .info_mask_shared_by_all_available = \
> + BIT(IIO_CHAN_INFO_OVERSAMPLING_RATIO), \
> + .indexed = 1, \
> + .channel = 0, \
> + .channel2 = 1, \
> + .differential = 1, \
> + .scan_index = 0, \
> + .scan_type = { \
> + .sign = 'u', \
> + .realbits = 16, \
> + .storagebits = 16, \
> + }, \
> +}
> +
> +static const struct ad7405_chip_info ad7405_chip_info = {
> + .name = "ad7405",
> + .full_scale_mv = 320,
> + .channel = AD7405_IIO_CHANNEL,
Why do we need this .channel element if all instances use the
same one? If you are are shortly going to add support for more devices
where this will change then this is ok. If not, just have one
static const channel and use that without looking it up via these
chip_info structures.
> +};
> +
> +static const struct ad7405_chip_info adum7701_chip_info = {
> + .name = "adum7701",
> + .full_scale_mv = 320,
> + .channel = AD7405_IIO_CHANNEL,
> +};
> +
> +static const struct ad7405_chip_info adum7702_chip_info = {
> + .name = "adum7702",
> + .full_scale_mv = 64,
> + .channel = AD7405_IIO_CHANNEL,
> +};
> +
> +static const struct ad7405_chip_info adum7703_chip_info = {
> + .name = "adum7703",
> + .full_scale_mv = 320,
> + .channel = AD7405_IIO_CHANNEL,
> +};
Powered by blists - more mailing lists