From: Jonathan Cameron <jic23@kernel.org>
To: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
Cc: David Lechner <dlechner@baylibre.com>,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org,
Jonathan.Cameron@huawei.com, nuno.sa@analog.com, andy@kernel.org
Subject: Re: [RFC PATCH v1 2/9] iio: ABI: Accurately describe in_distance_input
Date: Sat, 31 Jan 2026 18:52:38 +0000 [thread overview]
Message-ID: <20260131185238.675c93cb@jic23-huawei> (raw)
In-Reply-To: <aXA-p5p5dT3uBDva@debian-BULLSEYE-live-builder-AMD64>
On Tue, 20 Jan 2026 23:49:11 -0300
Marcelo Schmitt <marcelo.schmitt1@gmail.com> wrote:
> On 01/18, David Lechner wrote:
> > On 1/18/26 12:20 PM, Marcelo Schmitt wrote:
> > > There is only one driver (drivers/iio/accel/mma9553.c) that declares a
> > > channel of type IIO_DISTANCE with an info_mask containing
> > > IIO_CHAN_INFO_PROCESSED. Though, mma9553.c provides distance in meters (as
> > > would be expected for the _input interface). Split in_distance_raw and
> > > in_distance_input ABI documentation to provide accurate description for the
> > > in_distance_input interface.
> > >
> > > Fixes: 7cf78db585b1 ("iio: Add ABI documentation for illuminance raw and scale values in light")
> > > Signed-off-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
> > > ---
> > > Added a fix tag though not sure it's needed/desired since it might not be worth
> > > to backport documentation?
> > >
> > > Documentation/ABI/testing/sysfs-bus-iio | 7 +++++++
> > > 1 file changed, 7 insertions(+)
> > >
> > > diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
> > > index aec39b8e3345..27251b65ea0e 100644
> > > --- a/Documentation/ABI/testing/sysfs-bus-iio
> > > +++ b/Documentation/ABI/testing/sysfs-bus-iio
> > > @@ -1613,6 +1613,13 @@ Description:
> > > user). Units after application of scale are Joules.
> > >
> > > What: /sys/.../iio:deviceX/in_distance_input
> > > +KernelVersion: 4.0
> > > +Contact: linux-iio@vger.kernel.org
> > > +Description:
> > > + This attribute is used to read the measured distance (in meters)
> > > + to an object or the distance covered by the user since the last
> > > + reboot while activated.
> > > +
> > > What: /sys/.../iio:deviceX/in_distance_raw
> > > KernelVersion: 4.0
> > > Contact: linux-iio@vger.kernel.org
> >
> > I'm not sure it is worth splitting these up since the documentation is
> > just repeated except for the bit about scale. And it is common knowledge
> > that scale only applies to raw and not input.
>
> It's common knowledge to us who are familiar with IIO. For anyone else, it might
> not be. Plus, it is tecnically incorrect to have _raw and _input together like
> they were before.
If it's caused confusion. I think it's worth splitting them.
If the repeated text becomes too large, we can use a cross reference.
J
>
> >
> > Also, looks like raw and input are swapped. raw it the one with scale
> > so the sentence about scale should be with the raw attribute.
>
> Hmm, have I messed up with the patches? Their final look in my local tree is:
>
> What: /sys/.../iio:deviceX/in_distance_input
> KernelVersion: 4.0
> Contact: linux-iio@vger.kernel.org
> Description:
> This attribute is used to read the measured distance (in meters)
> to an object or the distance covered by the user since the last
> reboot while activated.
>
> What: /sys/.../iio:deviceX/in_distance_raw
> KernelVersion: 4.0
> Contact: linux-iio@vger.kernel.org
> Description:
> This attribute is used to read the measured distance to an object
> or the distance covered by the user since the last reboot while
> activated. Units after application of scale are meters.
next prev parent reply other threads:[~2026-01-31 18:52 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-01-18 18:18 [RFC PATCH v1 0/9] iio: Expand IIO event interface for real-world unit handling Marcelo Schmitt
2026-01-18 18:18 ` [RFC PATCH v1 1/9] iio: ABI: Drop unused in_energy_input Marcelo Schmitt
2026-01-31 18:51 ` Jonathan Cameron
2026-01-18 18:20 ` [RFC PATCH v1 2/9] iio: ABI: Accurately describe in_distance_input Marcelo Schmitt
2026-01-18 19:46 ` David Lechner
2026-01-21 2:49 ` Marcelo Schmitt
2026-01-31 18:52 ` Jonathan Cameron [this message]
2026-01-18 18:20 ` [RFC PATCH v1 3/9] iio: ABI: Accurately describe in_illuminance[Y]_input Marcelo Schmitt
2026-01-18 18:20 ` [RFC PATCH v1 4/9] iio: ABI: Slight readability improve for event threshold value doc Marcelo Schmitt
2026-01-18 18:21 ` [RFC PATCH v1 5/9] iio: ABI: Update event threshold value documentation Marcelo Schmitt
2026-01-18 18:21 ` [RFC PATCH v1 6/9] iio: ABI: Adjust event threshold enable desc to unitless thresh values Marcelo Schmitt
2026-01-18 18:21 ` [RFC PATCH v1 7/9] iio: Expand IIO event interface for real-world unit handling Marcelo Schmitt
2026-01-18 20:10 ` David Lechner
2026-01-31 18:55 ` Jonathan Cameron
2026-01-18 18:22 ` [RFC PATCH v1 8/9] iio: dummy: iio_simple_dummy: Update to event unit expanded interface Marcelo Schmitt
2026-01-18 18:22 ` [RFC PATCH v1 9/9] iio: adc: ad7091r-base: " Marcelo Schmitt
2026-01-18 20:33 ` [RFC PATCH v1 0/9] iio: Expand IIO event interface for real-world unit handling David Lechner
2026-01-21 2:40 ` Marcelo Schmitt
2026-01-21 9:33 ` Nuno Sá
2026-01-21 17:43 ` David Lechner
2026-01-31 18:48 ` Jonathan Cameron
2026-02-02 10:21 ` Nuno Sá
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=20260131185238.675c93cb@jic23-huawei \
--to=jic23@kernel.org \
--cc=Jonathan.Cameron@huawei.com \
--cc=andy@kernel.org \
--cc=dlechner@baylibre.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marcelo.schmitt1@gmail.com \
--cc=nuno.sa@analog.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