[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <b3088d35-fb66-4736-8c6c-f80b05a380c6@gmail.com>
Date: Wed, 3 Apr 2024 12:55:17 +0300
From: "Ceclan, Dumitru" <mitrutzceclan@...il.com>
To: David Lechner <dlechner@...libre.com>, dumitru.ceclan@...log.com
Cc: Lars-Peter Clausen <lars@...afoo.de>,
Michael Hennerich <Michael.Hennerich@...log.com>,
Jonathan Cameron <jic23@...nel.org>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>, linux-iio@...r.kernel.org,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH 6/6] iio: adc: ad7173: Add support for AD411x devices
On 02/04/2024 17:00, David Lechner wrote:
> On Mon, Apr 1, 2024 at 2:45 PM David Lechner <dlechner@...libre.com> wrote:
>>
>> On Mon, Apr 1, 2024 at 10:10 AM Dumitru Ceclan via B4 Relay
>> <devnull+dumitru.ceclan.analog.com@...nel.org> wrote:
..
>>> *chan = ad7173_channel_template;
>>> chan->address = chan_index;
>>> 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]);
>>> + if (reg >= AD4111_CURRENT_CHAN_CUTOFF) {
>>> + chan->type = IIO_CURRENT;
>>> + chan->channel = ain[0];
>>> + chan_st_priv->ain = ad4111_current_channel_config[ain[0]];
>>> + } else {
>>> + chan->channel = ain[0];
>>> + chan->channel2 = ain[1];
>>> + chan->differential = true;
>>
>> Expecting chan->differential = false when ADCIN15 is configured for
>> pseudo-differential inputs.
>>
>> Also, perhaps missed in previous reviews, I would expect
>> chan->differential = false when channels are used as single-ended.
>>
>
> After sleeping on it, I came to the concision that these parts are
> probably too complex to try to worry about differential vs.
> pseudo-differential/single-ended (what the datasheet calls
> single-ended is really pseudo-differential).
>
> So I take back my comments about expecting differential = false in those cases.
Alrighty then
Powered by blists - more mailing lists