[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20251213162637.678b2b82@jic23-huawei>
Date: Sat, 13 Dec 2025 16:26:37 +0000
From: Jonathan Cameron <jic23@...nel.org>
To: "Miclaus, Antoniu" <Antoniu.Miclaus@...log.com>
Cc: Lars-Peter Clausen <lars@...afoo.de>, "Hennerich, Michael"
<Michael.Hennerich@...log.com>, David Lechner <dlechner@...libre.com>, "Sa,
Nuno" <Nuno.Sa@...log.com>, Andy Shevchenko <andy@...nel.org>, Rob Herring
<robh@...nel.org>, Krzysztof Kozlowski <krzk+dt@...nel.org>, Conor Dooley
<conor+dt@...nel.org>, "linux-iio@...r.kernel.org"
<linux-iio@...r.kernel.org>, "devicetree@...r.kernel.org"
<devicetree@...r.kernel.org>, "linux-kernel@...r.kernel.org"
<linux-kernel@...r.kernel.org>
Subject: Re: [PATCH v6 2/2] iio: amplifiers: adl8113: add driver support
On Fri, 12 Dec 2025 10:41:07 +0000
"Miclaus, Antoniu" <Antoniu.Miclaus@...log.com> wrote:
> Hi,
> >
> > Could do this as something like:
> >
> > st->gain_configs[i++] = (struct adl8113_gain_config) {
> > .path = ADL8113_INTERNAL_AMP,
> > .gain_db = 14,
> > };
> >
> > st->gain_configs[i++] = (struct adl8113_gain_config) {
> > .path = ADL8113_INTERNAL_BYPASS,
> > .gain_db = -2,
> > };
> >
> > etc.
> >
> > > + i++;
> > > +
> > > + /* Always include internal bypass (-2dB insertion loss) */
> > > + st->gain_configs[i].path = ADL8113_INTERNAL_BYPASS;
> > > + st->gain_configs[i].gain_db = -2;
> > > + i++;
> > > +
> > > + /* Add external bypass A if configured */
> > > + if (!device_property_read_u32(dev, "adi,external-bypass-a-gain-db",
> > > + &external_a_gain)) {
> > > + st->gain_configs[i].path = ADL8113_EXTERNAL_A;
> > > + st->gain_configs[i].gain_db = external_a_gain;
> > > + i++;
> > > + }
> > > +
> > > + /* Add external bypass B if configured */
> > > + if (!device_property_read_u32(dev, "adi,external-bypass-b-gain-db",
> > > + &external_b_gain)) {
> > > + st->gain_configs[i].path = ADL8113_EXTERNAL_B;
> > > + st->gain_configs[i].gain_db = external_b_gain;
> > > + i++;
> > > + }
> > > +
> > > + /*
> > > + * If there's a free external bypass path, add one with INT_MIN gain
> > > + * to represent "nothing connected" for testing purposes
> >
> > I don't follow this one. What sort of testing purpose? Something we want
> > in a real system?
> This addition was suggested by David in v4. But I can revert it in the next series.
Ok. I looked back and found it. I don't mind this feature with
more explanation. However, I'm not sure it's actually useful other than for
replicating figure 121 on the datasheet which I can't really see as particularly
useful for testing. Mind you I've no real idea how these are used :)
Jonathan
>
> Regards,
> Antoniu
Powered by blists - more mailing lists