From: Jonathan Cameron <jic23@kernel.org>
To: "Miclaus, Antoniu" <Antoniu.Miclaus@analog.com>
Cc: "robh@kernel.org" <robh@kernel.org>,
"conor+dt@kernel.org" <conor+dt@kernel.org>,
"linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>
Subject: Re: [PATCH v2 2/3] iio: amplifiers: adl8113: add driver support
Date: Sat, 15 Nov 2025 18:12:54 +0000 [thread overview]
Message-ID: <20251115181254.32b00b34@jic23-huawei> (raw)
In-Reply-To: <CY4PR03MB33991FC450F33126532B80C19BCFA@CY4PR03MB3399.namprd03.prod.outlook.com>
> > > +
> > > +static int adl8113_read_raw(struct iio_dev *indio_dev,
> > > + struct iio_chan_spec const *chan,
> > > + int *val, int *val2, long mask)
> > > +{
> > > + struct adl8113_state *st = iio_priv(indio_dev);
> > > + int ret;
> > > +
> > > + switch (mask) {
> > > + case IIO_CHAN_INFO_HARDWAREGAIN:
> > > + switch (st->current_mode) {
> > > + case ADL8113_INTERNAL_AMPLIFIER:
> > > + *val = 14;
> > > + *val2 = 0;
> > > + ret = IIO_VAL_INT_PLUS_MICRO_DB;
> > return ...
> >
> > > + break;
> > > + case ADL8113_INTERNAL_BYPASS:
> > > + *val = 0;
> > > + *val2 = 0;
> > gain of bypass = 1.0 rather than 0.0 which is open circuit gain.
> Isn't this supposed to be a dB value since I am returning IIO_VAL_INT_PLUS_MICRO_DB? Linear gain of 1 = 0dB.
Good point. I missed the DB type.
Thanks,
J
next prev parent reply other threads:[~2025-11-15 18:12 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-08 17:43 [PATCH v2 0/3] iio: amplifiers: add support for ADL8113 Low Noise Amplifier Antoniu Miclaus
2025-11-08 17:43 ` [PATCH v2 1/3] dt-bindings: iio: amplifiers: add adl8113 Antoniu Miclaus
2025-11-08 18:25 ` Rob Herring (Arm)
2025-11-08 17:43 ` [PATCH v2 2/3] iio: amplifiers: adl8113: add driver support Antoniu Miclaus
2025-11-09 17:22 ` Jonathan Cameron
2025-11-11 14:06 ` Miclaus, Antoniu
2025-11-15 18:12 ` Jonathan Cameron [this message]
2025-11-08 17:43 ` [PATCH v2 3/3] Documentation: ABI: adl8113: add documentation Antoniu Miclaus
2025-11-09 17:18 ` Jonathan Cameron
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=20251115181254.32b00b34@jic23-huawei \
--to=jic23@kernel.org \
--cc=Antoniu.Miclaus@analog.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--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