From: Jonathan Cameron <jic23@kernel.org>
To: "David Lechner (TI)" <dlechner@baylibre.com>
Cc: "Nuno Sá" <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>,
"Chris Hall" <c-hall@ti.com>, "Patrick Edwards" <pedwards@ti.com>,
"Kurt Borja" <kuurtb@gmail.com>,
"Nguyen Minh Tien" <zizuzacker@gmail.com>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2 7/8] iio: adc: ti-ads112c14: implement gain on internal short SYS_MON channel
Date: Wed, 1 Jul 2026 21:02:04 +0100 [thread overview]
Message-ID: <20260701210204.068f4aea@jic23-huawei> (raw)
In-Reply-To: <20260625-iio-adc-ti-ads122c14-v2-7-ceb9b0b561cb@baylibre.com>
On Thu, 25 Jun 2026 16:55:09 -0500
"David Lechner (TI)" <dlechner@baylibre.com> wrote:
> Implement support for the programmable gain amplifier on the internal
> short SYS_MON channel. This channel is used for calibration, so it is
> useful to be able to set the PGA to the same gain as the external
> channels. The gain setting is implemented via the `_scale` attribute.
>
> In the future, we may want to support different reference voltages for
> this channel, so the scale_available table is populated during probe
> rather than being a static table.
>
> Signed-off-by: David Lechner (TI) <dlechner@baylibre.com>
Trivial stuff again.
> ---
> v2 changes:
> * Make some changes to reduce diff in next patch.
> * Add some local variables to reduce line wrap.
> ---
> drivers/iio/adc/ti-ads112c14.c | 144 ++++++++++++++++++++++++++++++++++++++++-
> 1 file changed, 141 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/iio/adc/ti-ads112c14.c b/drivers/iio/adc/ti-ads112c14.c
> index c61d47244732..0e775dbc8d50 100644
> --- a/drivers/iio/adc/ti-ads112c14.c
> +++ b/drivers/iio/adc/ti-ads112c14.c
> @@ -124,6 +124,26 @@
> #define ADS112C14_INT_REF0_mV 1250
> #define ADS112C14_INT_REF1_mV 2500
>
> +/* Available gains as tenths (x10) */
> +static const u32 ads112c14_pga_gains_x10[] = {
> + 5, /* 0.5 */
Not sure it is worth commenting all of them!
> + 10, /* 1 */
> + 20, /* 2 */
> + 40, /* 4 */
> + 50, /* 5 */
> + 80, /* 8 */
> + 100, /* 10 */
> + 160, /* 16 */
> + 200, /* 20 */
> + 320, /* 32 */
> + 500, /* 50 */
> + 640, /* 64 */
> + 1000, /* 100 */
> + 1280, /* 128 */
> + 2000, /* 200 */
> + 2560, /* 256 */
> +};
next prev parent reply other threads:[~2026-07-01 20:02 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-25 21:55 [PATCH v2 0/8] iio: adc: new ti-ads112c14 driver David Lechner
2026-06-25 21:55 ` [PATCH v2 1/8] dt-bindings: iio: adc: Add reference-sources property David Lechner
2026-06-26 16:12 ` Conor Dooley
2026-06-29 6:47 ` Kurt Borja
2026-06-25 21:55 ` [PATCH v2 2/8] dt-bindings: iio: adc: Add excitation current sources properties David Lechner
2026-06-26 16:10 ` Conor Dooley
2026-07-01 19:39 ` Jonathan Cameron
2026-07-01 22:07 ` David Lechner
2026-06-25 21:55 ` [PATCH v2 3/8] dt-bindings: iio: adc: Add burn-out current properties David Lechner
2026-06-26 16:12 ` Conor Dooley
2026-06-25 21:55 ` [PATCH v2 4/8] dt-bindings: iio: adc: add input-channel-rotation property David Lechner (TI)
2026-06-26 16:14 ` Conor Dooley
2026-06-26 18:27 ` David Lechner
2026-07-01 19:41 ` Jonathan Cameron
2026-06-25 21:55 ` [PATCH v2 5/8] dt-bindings: iio: adc: add ti,ads122c14 David Lechner (TI)
2026-06-25 22:12 ` sashiko-bot
2026-06-26 16:18 ` Conor Dooley
2026-06-26 18:35 ` David Lechner
2026-06-27 14:03 ` Conor Dooley
2026-07-01 19:50 ` Jonathan Cameron
2026-06-25 21:55 ` [PATCH v2 6/8] iio: adc: add ti-ads112c14 driver David Lechner (TI)
2026-06-25 22:07 ` sashiko-bot
2026-07-01 19:59 ` Jonathan Cameron
2026-06-25 21:55 ` [PATCH v2 7/8] iio: adc: ti-ads112c14: implement gain on internal short SYS_MON channel David Lechner (TI)
2026-06-25 22:08 ` sashiko-bot
2026-07-01 20:02 ` Jonathan Cameron [this message]
2026-06-25 21:55 ` [PATCH v2 8/8] iio: adc: ti-ads112c14: add measurement channel support David Lechner (TI)
2026-06-25 22:11 ` sashiko-bot
2026-07-01 20:20 ` Jonathan Cameron
2026-07-02 9:18 ` Andy Shevchenko
2026-07-02 14:18 ` David Lechner
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=20260701210204.068f4aea@jic23-huawei \
--to=jic23@kernel.org \
--cc=andy@kernel.org \
--cc=c-hall@ti.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=krzk+dt@kernel.org \
--cc=kuurtb@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--cc=pedwards@ti.com \
--cc=robh@kernel.org \
--cc=zizuzacker@gmail.com \
/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