lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
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

Powered by Openwall GNU/*/Linux Powered by OpenVZ