From: Jonathan Cameron <jic23@kernel.org>
To: Dumitru Ceclan via B4 Relay
<devnull+dumitru.ceclan.analog.com@kernel.org>
Cc: dumitru.ceclan@analog.com, Lars-Peter Clausen <lars@metafoo.de>,
Michael Hennerich <Michael.Hennerich@analog.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
David Lechner <dlechner@baylibre.com>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org,
Dumitru Ceclan <mitrutzceclan@gmail.com>
Subject: Re: [PATCH v2 8/9] iio: adc: ad7173: Add support for AD411x devices
Date: Sun, 19 May 2024 18:13:49 +0100 [thread overview]
Message-ID: <20240519181349.0209271c@jic23-huawei> (raw)
In-Reply-To: <20240514-ad4111-v2-8-29be6a55efb5@analog.com>
On Tue, 14 May 2024 10:22:53 +0300
Dumitru Ceclan via B4 Relay <devnull+dumitru.ceclan.analog.com@kernel.org> wrote:
> From: Dumitru Ceclan <dumitru.ceclan@analog.com>
>
> Add support for AD4111/AD4112/AD4114/AD4115/AD4116.
>
> The AD411X family encompasses a series of low power, low noise, 24-bit,
> sigma-delta analog-to-digital converters that offer a versatile range of
> specifications.
>
> This family of ADCs integrates an analog front end suitable for processing
> both fully differential and single-ended, bipolar voltage inputs
> addressing a wide array of industrial and instrumentation requirements.
>
> - All ADCs have inputs with a precision voltage divider with a division
> ratio of 10.
> - AD4116 has 5 low level inputs without a voltage divider.
> - AD4111 and AD4112 support current inputs (0 mA to 20 mA) using a 50ohm
> shunt resistor.
>
> Signed-off-by: Dumitru Ceclan <dumitru.ceclan@analog.com>
A couple of trivial things inline. Otherwise lgtm
> @@ -1058,17 +1296,26 @@ static int ad7173_fw_parse_channel_config(struct iio_dev *indio_dev)
> chan->scan_index = chan_index;
> chan->channel = ain[0];
> chan->channel2 = ain[1];
> - chan->differential = true;
> -
> chan_st_priv->ain = AD7173_CH_ADDRESS(ain[0], ain[1]);
> chan_st_priv->chan_reg = chan_index;
> - chan_st_priv->cfg.input_buf = st->info->has_input_buf;
> chan_st_priv->cfg.odr = 0;
> -
> chan_st_priv->cfg.bipolar = fwnode_property_read_bool(child, "bipolar");
> +
> if (chan_st_priv->cfg.bipolar)
> chan->info_mask_separate |= BIT(IIO_CHAN_INFO_OFFSET);
>
> + if (is_current_chan)
> + chan->type = IIO_CURRENT;
> + else
> + chan_st_priv->cfg.input_buf = st->info->has_input_buf;
> +
> + ret = fwnode_property_match_property_string(child,
> + "adi,channel-type",
> + ad7173_channel_types,
> + ARRAY_SIZE(ad7173_channel_types));
> + chan->differential = (ret < 0 || ret == AD7173_CHAN_DIFFERENTIAL)
> + ? true : false;
That's not a boolean. So better to set 1 or 0.
> +MODULE_DESCRIPTION("Analog Devices AD717x and AD411x ADC driver");
I'm scared of wildcards even in descriptive fields as they often end up covering
something unintended. I'd just go with 'and similar'.
> MODULE_LICENSE("GPL");
>
next prev parent reply other threads:[~2024-05-19 17:14 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-14 7:22 [PATCH v2 0/9] Add support for AD411x Dumitru Ceclan via B4 Relay
2024-05-14 7:22 ` [PATCH v2 1/9] dt-bindings: adc: ad7173: add support for ad411x Dumitru Ceclan via B4 Relay
2024-05-15 22:37 ` David Lechner
2024-05-16 15:49 ` Ceclan, Dumitru
2024-05-16 16:43 ` David Lechner
2024-05-19 16:54 ` Jonathan Cameron
2024-05-14 7:22 ` [PATCH v2 2/9] iio: adc: ad7173: fix buffers enablement for ad7176-2 Dumitru Ceclan via B4 Relay
2024-05-14 7:22 ` [PATCH v2 3/9] iio: adc: ad7173: refactor channel configuration parsing Dumitru Ceclan via B4 Relay
2024-05-19 16:58 ` Jonathan Cameron
2024-05-14 7:22 ` [PATCH v2 4/9] iio: adc: ad7173: refactor ain and vref selection Dumitru Ceclan via B4 Relay
2024-05-15 22:54 ` David Lechner
2024-05-19 19:17 ` Jonathan Cameron
2024-05-14 7:22 ` [PATCH v2 5/9] iio: adc: ad7173: add support for special inputs Dumitru Ceclan via B4 Relay
2024-05-15 23:27 ` David Lechner
2024-05-16 16:03 ` Ceclan, Dumitru
2024-05-14 7:22 ` [PATCH v2 6/9] iio: adc: ad7173: Add ad7173_device_info names Dumitru Ceclan via B4 Relay
2024-05-15 23:32 ` David Lechner
2024-05-16 16:09 ` Ceclan, Dumitru
2024-05-16 16:43 ` David Lechner
2024-05-19 17:09 ` Jonathan Cameron
2024-05-14 7:22 ` [PATCH v2 7/9] iio: adc: ad7173: Remove index from temp channel Dumitru Ceclan via B4 Relay
2024-05-15 23:34 ` David Lechner
2024-05-19 17:08 ` Jonathan Cameron
2024-05-14 7:22 ` [PATCH v2 8/9] iio: adc: ad7173: Add support for AD411x devices Dumitru Ceclan via B4 Relay
2024-05-19 17:13 ` Jonathan Cameron [this message]
2024-05-14 7:22 ` [PATCH v2 9/9] iio: adc: ad7173: Reduce device info struct size Dumitru Ceclan via B4 Relay
2024-05-15 22:35 ` [PATCH v2 0/9] Add support for AD411x David Lechner
2024-05-16 16:15 ` Ceclan, Dumitru
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=20240519181349.0209271c@jic23-huawei \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=devnull+dumitru.ceclan.analog.com@kernel.org \
--cc=dlechner@baylibre.com \
--cc=dumitru.ceclan@analog.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mitrutzceclan@gmail.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