public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: "Miclaus, Antoniu" <Antoniu.Miclaus@analog.com>
Cc: Lars-Peter Clausen <lars@metafoo.de>,
	"Hennerich, Michael" <Michael.Hennerich@analog.com>,
	David Lechner <dlechner@baylibre.com>,
	"Sa, Nuno" <Nuno.Sa@analog.com>,
	Andy Shevchenko <andy@kernel.org>, Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH v6 2/2] iio: amplifiers: adl8113: add driver support
Date: Sat, 13 Dec 2025 16:26:37 +0000	[thread overview]
Message-ID: <20251213162637.678b2b82@jic23-huawei> (raw)
In-Reply-To: <CY4PR03MB3399DB00FCF85E28132833199BAEA@CY4PR03MB3399.namprd03.prod.outlook.com>

On Fri, 12 Dec 2025 10:41:07 +0000
"Miclaus, Antoniu" <Antoniu.Miclaus@analog.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


      reply	other threads:[~2025-12-13 16:26 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-12-05 14:40 [PATCH v6 0/2] iio: amplifiers: add support for ADL8113 Low Noise Amplifier Antoniu Miclaus
2025-12-05 14:40 ` [PATCH v6 1/2] dt-bindings: iio: amplifiers: add adl8113 Antoniu Miclaus
2025-12-06 18:50   ` Jonathan Cameron
2025-12-09 20:51   ` Rob Herring (Arm)
2025-12-05 14:40 ` [PATCH v6 2/2] iio: amplifiers: adl8113: add driver support Antoniu Miclaus
2025-12-05 15:10   ` Andy Shevchenko
2025-12-06 19:03   ` Jonathan Cameron
2025-12-06 20:48     ` Andy Shevchenko
2025-12-07 12:52       ` Jonathan Cameron
2025-12-12 10:41     ` Miclaus, Antoniu
2025-12-13 16:26       ` Jonathan Cameron [this message]

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=20251213162637.678b2b82@jic23-huawei \
    --to=jic23@kernel.org \
    --cc=Antoniu.Miclaus@analog.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=Nuno.Sa@analog.com \
    --cc=andy@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=krzk+dt@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --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