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]
Message-ID: <CAMknhBHf_9kFfLySJmRyoUS6UFfTeLW3bfEi1-3ApEDHyyVhCw@mail.gmail.com>
Date: Tue, 2 Apr 2024 09:00:10 -0500
From: David Lechner <dlechner@...libre.com>
To: 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, Dumitru Ceclan <mitrutzceclan@...il.com>
Subject: Re: [PATCH 6/6] iio: adc: ad7173: Add support for AD411x devices

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:
> >
> > From: Dumitru Ceclan <dumitru.ceclan@...log.com>
> >
> > Add support for AD4111/AD4112/AD4114/AD4115/AD4116.
> >

..

> > @@ -1028,15 +1204,22 @@ static int ad7173_fw_parse_channel_config(struct iio_dev *indio_dev)
> >                 *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.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ