public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Antoniu Miclaus <antoniu.miclaus@analog.com>
Cc: <robh@kernel.org>, <conor+dt@kernel.org>,
	<linux-iio@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <linux-pwm@vger.kernel.org>
Subject: Re: [PATCH v12 9/9] iio: adc: ad4851: add ad485x driver
Date: Sat, 8 Feb 2025 16:28:35 +0000	[thread overview]
Message-ID: <20250208162835.719e0638@jic23-huawei> (raw)
In-Reply-To: <20250207140918.7814-10-antoniu.miclaus@analog.com>

On Fri, 7 Feb 2025 16:09:18 +0200
Antoniu Miclaus <antoniu.miclaus@analog.com> wrote:

> Add support for the AD485X a fully buffered, 8-channel simultaneous
> sampling, 16/20-bit, 1 MSPS data acquisition system (DAS) with
> differential, wide common-mode range inputs.
> 
> Signed-off-by: Antoniu Miclaus <antoniu.miclaus@analog.com>
Hi Antoniu

One really trivial comment to add from me.

Jonathan

> diff --git a/drivers/iio/adc/ad4851.c b/drivers/iio/adc/ad4851.c
> new file mode 100644
> index 000000000000..01cc88ecad52
> --- /dev/null
> +++ b/drivers/iio/adc/ad4851.c
> @@ -0,0 +1,1316 @@


> +
> +static int ad4858_parse_channels(struct iio_dev *indio_dev)
> +{
> +	struct ad4851_state *st = iio_priv(indio_dev);
> +	struct device *dev = &st->spi->dev;
> +	struct iio_chan_spec *ad4851_channels;
> +	const struct iio_chan_spec ad4851_chan = AD4858_IIO_CHANNEL;
> +	int ret;
> +
> +	ret = ad4851_parse_channels_common(indio_dev, &ad4851_channels,
> +					   ad4851_chan);
> +	if (ret < 0)
> +		return ret;
> +
> +	device_for_each_child_node_scoped(dev, child) {
> +		ad4851_channels->has_ext_scan_type = 1;
> +		if (fwnode_property_read_bool(child, "bipolar")) {
> +			ad4851_channels->ext_scan_type = ad4851_scan_type_20_b;
> +			ad4851_channels->num_ext_scan_type = ARRAY_SIZE(ad4851_scan_type_20_b);
> +

Trivial but this blank line doesn't add anything useful and looks a bit odd!

> +		} else {
> +			ad4851_channels->ext_scan_type = ad4851_scan_type_20_u;
> +			ad4851_channels->num_ext_scan_type = ARRAY_SIZE(ad4851_scan_type_20_u);
> +		}
> +		ad4851_channels++;
> +	}
> +
> +	indio_dev->channels = ad4851_channels;
> +	indio_dev->num_channels = ret;
> +
> +	return 0;
> +}


      parent reply	other threads:[~2025-02-08 16:28 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-02-07 14:09 [PATCH v12 0/9] Add support for AD485x DAS Family Antoniu Miclaus
2025-02-07 14:09 ` [PATCH v12 1/9] iio: backend: add API for interface get Antoniu Miclaus
2025-02-07 14:09 ` [PATCH v12 2/9] iio: backend: add support for data size set Antoniu Miclaus
2025-02-07 14:09 ` [PATCH v12 3/9] iio: backend: add API for oversampling Antoniu Miclaus
2025-02-07 14:09 ` [PATCH v12 4/9] iio: adc: adi-axi-adc: add interface type Antoniu Miclaus
2025-02-07 14:09 ` [PATCH v12 5/9] dt-bindings: iio: adc: add ad485x axi variant Antoniu Miclaus
2025-02-08 16:20   ` Jonathan Cameron
2025-02-11  8:16     ` Krzysztof Kozlowski
2025-02-11 19:53       ` Jonathan Cameron
2025-02-07 14:09 ` [PATCH v12 6/9] iio: adc: adi-axi-adc: set data format Antoniu Miclaus
2025-02-07 20:51   ` David Lechner
2025-02-08 16:22   ` Jonathan Cameron
2025-02-11 19:55     ` Jonathan Cameron
2025-02-07 14:09 ` [PATCH v12 7/9] iio: adc: adi-axi-adc: add oversampling Antoniu Miclaus
2025-02-08 16:23   ` Jonathan Cameron
2025-02-07 14:09 ` [PATCH v12 8/9] dt-bindings: iio: adc: add ad4851 Antoniu Miclaus
2025-02-07 14:09 ` [PATCH v12 9/9] iio: adc: ad4851: add ad485x driver Antoniu Miclaus
2025-02-07 20:51   ` David Lechner
2025-02-08 16:28   ` Jonathan Cameron [this message]

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=20250208162835.719e0638@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=antoniu.miclaus@analog.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pwm@vger.kernel.org \
    --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