diff mbox series

[v5,4/4] iio: ABI: Document in_concentration_co2_scale

Message ID 20210909094537.218064-5-jacopo@jmondi.org (mailing list archive)
State Changes Requested
Headers show
Series iio: chemical: Add Senseair Sunrise CO2 sensor | expand

Commit Message

Jacopo Mondi Sept. 9, 2021, 9:45 a.m. UTC
Document the 'in_concentration_co2_scale' standard IIO attribute.

Signed-off-by: Jacopo Mondi <jacopo@jmondi.org>
---
 Documentation/ABI/testing/sysfs-bus-iio | 1 +
 1 file changed, 1 insertion(+)

Comments

Andy Shevchenko Sept. 9, 2021, 1:05 p.m. UTC | #1
On Thu, Sep 09, 2021 at 11:45:37AM +0200, Jacopo Mondi wrote:
> Document the 'in_concentration_co2_scale' standard IIO attribute.

...

> +What:		/sys/bus/iio/devices/iio:deviceX/in_concentration_co2_scale

I don't know the history of the discussion about this attribute but it seems
too specific to have in list of kinda generic ones.

Shouldn't be rather air / gas / etc used instead of CO2?
Jonathan Cameron Sept. 10, 2021, 10:47 a.m. UTC | #2
On Thu, 9 Sep 2021 16:05:41 +0300
Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:

> On Thu, Sep 09, 2021 at 11:45:37AM +0200, Jacopo Mondi wrote:
> > Document the 'in_concentration_co2_scale' standard IIO attribute.  
> 
> ...
> 
> > +What:		/sys/bus/iio/devices/iio:deviceX/in_concentration_co2_scale  
> 
> I don't know the history of the discussion about this attribute but it seems
> too specific to have in list of kinda generic ones.
> 
> Shouldn't be rather air / gas / etc used instead of CO2?
> 
I'm not following.  The sensor is measuring c02 concentration (in the air) so
we need to call that out.  Making it more general would mean we couldn't then
handle a sensor that had channels for c02 and oxygen for example.
We don't bother to distinguish the difference between concentration in gas or
liquid because it seemed unneeded.  This is sort of similar to the fact we
don't distinguish gas temperature (say in a humidity sensor) from object temperature
in an IR thermometer.  We could do so if there is a strong reason for it.

Using c02 as a modifier on a concentration channel is in line with how we
handled things like different light frequency ranges ir, visible, red, green, blue.

Jonathan
Jonathan Cameron Sept. 11, 2021, 3:04 p.m. UTC | #3
On Fri, 10 Sep 2021 11:47:33 +0100
Jonathan Cameron <Jonathan.Cameron@Huawei.com> wrote:

> On Thu, 9 Sep 2021 16:05:41 +0300
> Andy Shevchenko <andriy.shevchenko@linux.intel.com> wrote:
> 
> > On Thu, Sep 09, 2021 at 11:45:37AM +0200, Jacopo Mondi wrote:  
> > > Document the 'in_concentration_co2_scale' standard IIO attribute.    
> > 
> > ...
> >   
> > > +What:		/sys/bus/iio/devices/iio:deviceX/in_concentration_co2_scale    
> > 
> > I don't know the history of the discussion about this attribute but it seems
> > too specific to have in list of kinda generic ones.
> > 
> > Shouldn't be rather air / gas / etc used instead of CO2?
> >   
> I'm not following.  The sensor is measuring c02 concentration (in the air) so
> we need to call that out.  Making it more general would mean we couldn't then
> handle a sensor that had channels for c02 and oxygen for example.
> We don't bother to distinguish the difference between concentration in gas or
> liquid because it seemed unneeded.  This is sort of similar to the fact we
> don't distinguish gas temperature (say in a humidity sensor) from object temperature
> in an IR thermometer.  We could do so if there is a strong reason for it.
> 
> Using c02 as a modifier on a concentration channel is in line with how we
> handled things like different light frequency ranges ir, visible, red, green, blue.
> 
> Jonathan

We had a quick chat about this off list.

Andy's point was that ultimately it might be better to have a separate
attribute for the gas type. Andy may well be correct long term but this is
an existing bit of ABI so lets leave it as it stands for now.

Perhaps we will revisit this in future if we get a wide range of different types
of gas sensor.

Jonathan
diff mbox series

Patch

diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
index 6ad47a67521c..f19ff76a3b54 100644
--- a/Documentation/ABI/testing/sysfs-bus-iio
+++ b/Documentation/ABI/testing/sysfs-bus-iio
@@ -429,6 +429,7 @@  What:		/sys/bus/iio/devices/iio:deviceX/in_angl_scale
 What:		/sys/bus/iio/devices/iio:deviceX/in_intensity_x_scale
 What:		/sys/bus/iio/devices/iio:deviceX/in_intensity_y_scale
 What:		/sys/bus/iio/devices/iio:deviceX/in_intensity_z_scale
+What:		/sys/bus/iio/devices/iio:deviceX/in_concentration_co2_scale
 KernelVersion:	2.6.35
 Contact:	linux-iio@vger.kernel.org
 Description: