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
--
2.51.0
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.
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.
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.
>
> 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.
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.
© 2016 - 2026 Red Hat, Inc.