linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Tomasz Duszynski <tomasz.duszynski@octakon.com>
To: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Cc: Tomasz Duszynski <tomasz.duszynski@octakon.com>,
	<linux-iio@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<devicetree@vger.kernel.org>, <robh+dt@kernel.org>,
	<jic23@kernel.org>
Subject: Re: [PATCH 4/6] Documentation: ABI: testing: scd30: document iio attributes
Date: Thu, 23 Apr 2020 17:53:17 +0200	[thread overview]
Message-ID: <20200423155317.GB43448@arch> (raw)
In-Reply-To: <alpine.DEB.2.21.2004221818490.26800@vps.pmeerw.net>

On Wed, Apr 22, 2020 at 06:40:17PM +0200, Peter Meerwald-Stadler wrote:
> On Wed, 22 Apr 2020, Tomasz Duszynski wrote:
>
> > Add documentation for sensor specific iio attributes.
>
> minor comments below

Thanks.

>
> > Signed-off-by: Tomasz Duszynski <tomasz.duszynski@octakon.com>
> > ---
> >  Documentation/ABI/testing/sysfs-bus-iio-scd30 | 97 +++++++++++++++++++
> >  1 file changed, 97 insertions(+)
> >  create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-scd30
> >
> > diff --git a/Documentation/ABI/testing/sysfs-bus-iio-scd30 b/Documentation/ABI/testing/sysfs-bus-iio-scd30
> > new file mode 100644
> > index 000000000000..0431a718447d
> > --- /dev/null
> > +++ b/Documentation/ABI/testing/sysfs-bus-iio-scd30
> > @@ -0,0 +1,97 @@
> > +What:		/sys/bus/iio/devices/iio:deviceX/pressure_comp
> > +Date:		April 2020
> > +KernelVersion:	5.8
> > +Contact:	linux-iio@vger.kernel.org
> > +Description:
> > +		Given that sensor's CO2 measurement chamber has fixed volume
> > +		pressure changes will affect concentration readings. Writing
> > +		current ambient pressure here will allow senor to make necessary
>
> sensor
>

Okay.

> > +		adjustments. Upon reading previously set value is returned.
> > +		Units are millibars.
>
> unit for pressure in IIO is kilopascal (e.g.
> /sys/bus/iio/devices/iio:deviceX/in_pressure_raw)
>

My thinking here was that since these are sensor specific attributes
they don't need to stick to iio conventions and millibars were somewhat
more natural to use. But I guess that's just matter of habit.

So generally I am okay with reworking all attrs to accept values in iio
preferred units.

> > +
> > +What:		/sys/bus/iio/devices/iio:deviceX/pressure_comp_available
> > +Date:		April 2020
> > +KernelVersion:	5.8
> > +Contact:	linux-iio@vger.kernel.org
> > +Description:
> > +		The range of available values in millibars represented as the
> > +		minimum value, the step and the maximum value, all enclosed in
> > +		square brackets.
> > +
> > +What:		/sys/bus/iio/devices/iio:deviceX/meas_interval
> > +Date:		January 2020
> > +KernelVersion:	5.8
> > +Contact:	linux-iio@vger.kernel.org
> > +Description:
> > +		Amount of time between subsequent measurements. Writing this
> > +		attribute will change measurement interval. Upon reading
> > +		current measurement interval is returned. Units are seconds.
> > +
> > +What:		/sys/bus/iio/devices/iio:deviceX/meas_interval_available
> > +Date:		April 2020
> > +KernelVersion:	5.8
> > +Contact:	linux-iio@vger.kernel.org
> > +Description:
> > +		The range of available values in seconds represented as the
> > +		minimum value, the step and the maximum value, all enclosed in
> > +		square brackets.
> > +
> > +What:		/sys/bus/iio/devices/iio:deviceX/asc
> > +Date:		April 2020
> > +KernelVersion:	5.8
> > +Contact:	linux-iio@vger.kernel.org
> > +Description:
> > +		Writing 1 or 0 to this attribute will respectively activate or
> > +		deactivate automatic self calibration procedure. Upon reading 1
>
> deactivate automatic self calibration (asc) procedure
>

That shouldn't be too difficult to realize what asc actually stands for after
reading this short description.

> > +		is returned if asc is ongoing, 0 otherwise.
> > +
> > +What:		/sys/bus/iio/devices/iio:deviceX/frc
> > +Date:		April 2020
> > +KernelVersion:	5.8
> > +Contact:	linux-iio@vger.kernel.org
> > +Description:
> > +		Forced recalibration is used to compensate for sensor drifts
> > +		when a reference value of CO2 concentration in close proximity
> > +		to the sensor is available. Writing attribute will set frc
> > +		value. Upon reading current frc is returned. Units are
> > +		millibars.
> > +
> > +What:		/sys/bus/iio/devices/iio:deviceX/frc_available
> > +Date:		April 2020
> > +KernelVersion:	5.8
> > +Contact:	linux-iio@vger.kernel.org
> > +Description:
> > +		The range of available values in millibars represented as the
> > +		minimum value, the step and the maximum value, all enclosed in
> > +		square brackets.
> > +
> > +What:		/sys/bus/iio/devices/iio:deviceX/temp_offset
> > +Date:		April 2020
> > +KernelVersion:	5.8
> > +Contact:	linux-iio@vger.kernel.org
> > +Description:
> > +		Sensor readings may be affected by ambient temperature.
> > +		Writing temperature offset will compensate for unwanted changes.
> > +		Note that written offset gets multiplied by a factor of 100
> > +		by a sensor internally.
> > +
> > +		For example, writing 10 here will correspond to 0.1 degree
> > +		Celsius.
> > +
> > +What:		/sys/bus/iio/devices/iio:deviceX/temp_offset_available
> > +Date:		April 2020
> > +KernelVersion:	5.8
> > +Contact:	linux-iio@vger.kernel.org
> > +Description:
> > +		The range of available values in degrees Celsius represented as
> > +		the minimum value, the step and the maximum value, all enclosed
> > +		in square brackets.
> > +
> > +What:		/sys/bus/iio/devices/iio:deviceX/reset
> > +Date:		April 2020
> > +KernelVersion:	5.8
> > +Contact:	linux-iio@vger.kernel.org
> > +Description:
> > +		Software reset mechanism forces sensor into the same state
> > +		as after powering up without the need for removing power supply.
> > +		Writing any value will reset sensor.
> >
>
> --
>
> Peter Meerwald-Stadler
> Mobile: +43 664 24 44 418

  reply	other threads:[~2020-04-23 15:54 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-22 14:11 [PATCH 0/6] Add support for SCD30 sensor Tomasz Duszynski
2020-04-22 14:11 ` [PATCH 1/6] iio: chemical: scd30: add core driver Tomasz Duszynski
2020-04-22 19:49   ` Andy Shevchenko
2020-04-24 19:04     ` Tomasz Duszynski
2020-04-25 11:43       ` Andy Shevchenko
2020-04-25 17:59         ` Jonathan Cameron
2020-04-25 18:41         ` Tomasz Duszynski
2020-04-25 18:52           ` Andy Shevchenko
2020-04-28  7:56             ` Tomasz Duszynski
2020-04-28 10:16               ` Andy Shevchenko
2020-04-28 14:06                 ` Tomasz Duszynski
2020-04-25 18:55   ` Jonathan Cameron
2020-04-25 19:00     ` Jonathan Cameron
2020-04-28  7:51     ` Tomasz Duszynski
2020-05-02 16:37       ` Jonathan Cameron
2020-05-03 10:53         ` Tomasz Duszynski
2020-04-22 14:11 ` [PATCH 2/6] iio: chemical: scd30: add I2C interface driver Tomasz Duszynski
2020-04-22 14:11 ` [PATCH 3/6] iio: chemical: scd30: add serial " Tomasz Duszynski
2020-04-22 19:55   ` Andy Shevchenko
2020-04-23 16:23     ` Tomasz Duszynski
2020-04-22 14:11 ` [PATCH 4/6] Documentation: ABI: testing: scd30: document iio attributes Tomasz Duszynski
2020-04-22 16:40   ` Peter Meerwald-Stadler
2020-04-23 15:53     ` Tomasz Duszynski [this message]
2020-04-25 19:20       ` Jonathan Cameron
2020-04-26 11:11         ` Tomasz Duszynski
2020-04-27  9:44           ` Jonathan Cameron
2020-04-22 14:11 ` [PATCH 5/6] dt-bindings: iio: scd30: add device binding file Tomasz Duszynski
2020-04-25 19:23   ` Jonathan Cameron
2020-04-26  8:28     ` Tomasz Duszynski
2020-04-27 21:28   ` Rob Herring
2020-04-28  8:10     ` Tomasz Duszynski
2020-04-22 14:11 ` [PATCH 6/6] MAINTAINERS: add myself as a SCD30 driver maintainer Tomasz Duszynski
2020-04-22 19:25   ` Andy Shevchenko
2020-04-23 16:01     ` Tomasz Duszynski

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=20200423155317.GB43448@arch \
    --to=tomasz.duszynski@octakon.com \
    --cc=devicetree@vger.kernel.org \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pmeerw@pmeerw.net \
    --cc=robh+dt@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;
as well as URLs for NNTP newsgroup(s).