From: Jonathan Cameron <jic23@kernel.org>
To: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Cc: Marcelo Schmitt <marcelo.schmitt@analog.com>,
linux-iio@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, nuno.sa@analog.com,
Michael.Hennerich@analog.com, dlechner@baylibre.com,
andy@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, julianbraha@gmail.com
Subject: Re: [PATCH v9 6/6] iio: ABI: Encourage differential voltage ABI usage
Date: Sat, 15 Aug 2026 02:39:08 +0100 [thread overview]
Message-ID: <20260815023908.093a1fc8@jic23-huawei> (raw)
In-Reply-To: <any6pe6PBSR1uCZV@debian-BULLSEYE-live-builder-AMD64>
On Wed, 12 Aug 2026 15:25:41 -0300
Marcelo Schmitt <marcelo.schmitt1@gmail.com> wrote:
> On 08/12, Jonathan Cameron wrote:
> > On Mon, 27 Jul 2026 18:32:18 -0300
> > Marcelo Schmitt <marcelo.schmitt@analog.com> wrote:
> >
> > > So far, parts that could only do differential voltage measurements were
> > > only required to have a consistent labeling of their channels by complying
> > > either to voltageY or to voltageY-voltageZ ABI. Over time, code maintainers
> > > came to the conclusion that the voltageY-voltageZ ABI is better suited for
> > > differential-only chips as it provides a simple indication to users that
> > > the channels measure the difference of two inputs.
> > >
> > > Adjust the ABI documentation to recommend using the voltageY-voltageZ ABI
> > > for chips that do only differential voltage measurements.
> > >
> > > Signed-off-by: Marcelo Schmitt <marcelo.schmitt@analog.com>
> > Hi Marcelo
> >
> > Whilst looking at another series, I noticed we did something different
> > again in the devicetree bindings for those devices that have
> > restrictive muxes that means the positive and negative lines
> > always change together. For those we let
> >
> > diff-channels = <1 1>
> > which tends to map to
> >
> > in_voltageX-voltageX_raw
>
> Hmm, that sounds awesome. Probably a much more accurate way of presenting the
> channel(s) to user space. Wish I had realized that earlier.
>
> >
> > I'm not sure if we want to explicitly call that out as an option.
> > There is nothing in your new text saying we can't do that.
>
> I'd say probably best to mention the voltageX-X case. These fully differential
> inputs (that have the positive and negative lines changing together) are not uncommon.
> Sure, let me write something more comprehensive.
>
> It would also be best to use that notation for ltc2378. IIRC, it's okay to not
> specify the ADC channels in dt if all channels have the same properties so no
> need to update the dt-doc. For the IIO driver, we have the channel sysfs entries
> changing name. Will send v10 in case there's still any chance to get it updated.
> Also okay to wait for the next release cycle if possible.
Feel free to end an update and we'll sneak it in during the RCs as an 'abi' fix
(sort of) Stick a note asking me to do that under the --- so I don't forget.
Jonathan
>
> >
> > Worth also noting there are short circuit parts where you
> > really do connect both ends of the differential ADC to the
> > same input pin. I think it can be useful for testing / calibration?
> >
> > Jonathan
> >
>
> Thanks,
> Marcelo
>
> >
> > > ---
> > > No changes in v9.
> > >
> > > Documentation/ABI/testing/sysfs-bus-iio | 9 +++++----
> > > 1 file changed, 5 insertions(+), 4 deletions(-)
> > >
> > > diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
> > > index 5cc2e82c4997..7446e07b9ab2 100644
> > > --- a/Documentation/ABI/testing/sysfs-bus-iio
> > > +++ b/Documentation/ABI/testing/sysfs-bus-iio
> > > @@ -162,10 +162,11 @@ Contact: linux-iio@vger.kernel.org
> > > Description:
> > > Raw (unscaled) differential voltage measurement equivalent to
> > > channel Y - channel Z where these channel numbers apply to the
> > > - physically equivalent inputs when non differential readings are
> > > - separately available. In differential only parts, then all that
> > > - is required is a consistent labeling. Units after application
> > > - of scale and offset are millivolts.
> > > + physically equivalent inputs when non-differential readings are
> > > + separately available. Even though differential-only parts had
> > > + been merely required to have consistent channel labeling, this
> > > + ABI is preferred over the non-differential one for those chips.
> > > + Units after application of scale and offset are millivolts.
> > >
> > > What: /sys/bus/iio/devices/iio:deviceX/in_altvoltageY_rms_raw
> > > KernelVersion: 6.18
> >
prev parent reply other threads:[~2026-08-15 1:39 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-07-27 21:30 [PATCH v9 0/6] iio: adc: Add support for LTC2378 and similar ADCs Marcelo Schmitt
2026-07-27 21:30 ` [PATCH v9 1/6] dt-bindings: iio: adc: Add ltc2378 Marcelo Schmitt
2026-07-27 21:30 ` [PATCH v9 2/6] iio: adc: ltc2378: Add support for LTC2378-20 and similar ADCs Marcelo Schmitt
2026-07-27 21:42 ` sashiko-bot
2026-07-28 13:06 ` Marcelo Schmitt
2026-07-27 21:31 ` [PATCH v9 3/6] iio: adc: ltc2378: Enable high-speed data capture Marcelo Schmitt
2026-07-27 21:49 ` sashiko-bot
2026-07-27 21:31 ` [PATCH v9 4/6] iio: adc: ltc2378: Enable triggered buffer " Marcelo Schmitt
2026-07-27 21:31 ` [PATCH v9 5/6] iio: adc: ltc2378: Add support for LTC2338-18 Marcelo Schmitt
2026-07-27 21:40 ` sashiko-bot
2026-07-28 13:12 ` Marcelo Schmitt
2026-08-01 21:12 ` Jonathan Cameron
2026-08-10 7:37 ` Andy Shevchenko
2026-08-11 2:45 ` Marcelo Schmitt
2026-08-11 8:56 ` Andy Shevchenko
2026-08-12 4:03 ` Jonathan Cameron
2026-07-27 21:32 ` [PATCH v9 6/6] iio: ABI: Encourage differential voltage ABI usage Marcelo Schmitt
2026-08-12 4:01 ` Jonathan Cameron
2026-08-12 18:25 ` Marcelo Schmitt
2026-08-15 1:39 ` 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=20260815023908.093a1fc8@jic23-huawei \
--to=jic23@kernel.org \
--cc=Michael.Hennerich@analog.com \
--cc=andy@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=julianbraha@gmail.com \
--cc=krzk+dt@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.schmitt1@gmail.com \
--cc=marcelo.schmitt@analog.com \
--cc=nuno.sa@analog.com \
--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