Devicetree
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Pop Ioan Daniel <pop.ioan-daniel@analog.com>
Cc: "Lars-Peter Clausen" <lars@metafoo.de>,
	"Michael Hennerich" <Michael.Hennerich@analog.com>,
	"David Lechner" <dlechner@baylibre.com>,
	"Nuno Sá" <nuno.sa@analog.com>,
	"Andy Shevchenko" <andy@kernel.org>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Sergiu Cuciurean" <sergiu.cuciurean@analog.com>,
	"Dragos Bogdan" <dragos.bogdan@analog.com>,
	"Antoniu Miclaus" <antoniu.miclaus@analog.com>,
	"Olivier Moysan" <olivier.moysan@foss.st.com>,
	"Javier Carrasco" <javier.carrasco.cruz@gmail.com>,
	"Matti Vaittinen" <mazziesaccount@gmail.com>,
	"Angelo Dureghello" <adureghello@baylibre.com>,
	"Guillaume Stols" <gstols@baylibre.com>,
	"Tobias Sperling" <tobias.sperling@softing.com>,
	"Marcelo Schmitt" <marcelo.schmitt@analog.com>,
	"Trevor Gamblin" <tgamblin@baylibre.com>,
	"Alisa-Dariana Roman" <alisadariana@gmail.com>,
	"Ramona Alexandra Nechita" <ramona.nechita@analog.com>,
	"Herve Codina" <herve.codina@bootlin.com>,
	"AngeloGioacchino Del Regno"
	<angelogioacchino.delregno@collabora.com>,
	"Thomas Bonnefille" <thomas.bonnefille@bootlin.com>,
	"João Paulo Gonçalves" <joao.goncalves@toradex.com>,
	linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 5/5] iio: adc: ad7405: add ad7405 driver
Date: Sat, 7 Jun 2025 16:44:28 +0100	[thread overview]
Message-ID: <20250607164428.7a245af5@jic23-huawei> (raw)
In-Reply-To: <20250605150948.3091827-6-pop.ioan-daniel@analog.com>

On Thu, 5 Jun 2025 18:09:43 +0300
Pop Ioan Daniel <pop.ioan-daniel@analog.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@analog.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,
> +};


  reply	other threads:[~2025-06-07 15:44 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-05 15:09 [PATCH v7 0/5] Add support for AD7405/ADUM770x Pop Ioan Daniel
2025-06-05 15:09 ` [PATCH v7 1/5] iio: adc: ad4851: ad4851_set_oversampling_ratio parameters update Pop Ioan Daniel
2025-06-05 15:09 ` [PATCH v7 2/5] iio: backend: update iio_backend_oversampling_ratio_set Pop Ioan Daniel
2025-06-05 15:09 ` [PATCH v7 3/5] iio: adc: adi-axi-adc: add axi_adc_oversampling_ratio_set Pop Ioan Daniel
2025-06-05 15:09 ` [PATCH v7 4/5] dt-bindings: iio: adc: add ad7405 Pop Ioan Daniel
2025-06-05 15:09 ` [PATCH v7 5/5] iio: adc: ad7405: add ad7405 driver Pop Ioan Daniel
2025-06-07 15:44   ` Jonathan Cameron [this message]
2025-06-10 12:09     ` Ioan-daniel, Pop
2025-06-11 15:25       ` Jonathan Cameron
2025-06-12  7:38         ` Ioan-daniel, Pop
2025-06-09  8:05   ` 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=20250607164428.7a245af5@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Michael.Hennerich@analog.com \
    --cc=adureghello@baylibre.com \
    --cc=alisadariana@gmail.com \
    --cc=andy@kernel.org \
    --cc=angelogioacchino.delregno@collabora.com \
    --cc=antoniu.miclaus@analog.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=dragos.bogdan@analog.com \
    --cc=gstols@baylibre.com \
    --cc=herve.codina@bootlin.com \
    --cc=javier.carrasco.cruz@gmail.com \
    --cc=joao.goncalves@toradex.com \
    --cc=krzk+dt@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.schmitt@analog.com \
    --cc=mazziesaccount@gmail.com \
    --cc=nuno.sa@analog.com \
    --cc=olivier.moysan@foss.st.com \
    --cc=pop.ioan-daniel@analog.com \
    --cc=ramona.nechita@analog.com \
    --cc=robh@kernel.org \
    --cc=sergiu.cuciurean@analog.com \
    --cc=tgamblin@baylibre.com \
    --cc=thomas.bonnefille@bootlin.com \
    --cc=tobias.sperling@softing.com \
    /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