public inbox for linux-iio@vger.kernel.org
 help / color / mirror / Atom feed
From: Jonathan Cameron <jic23@kernel.org>
To: Gwendal Grignou <gwendal@chromium.org>
Cc: lars@metafoo.de, peress@chromium.org,
	enric.balletbo@collabora.com, linux-iio@vger.kernel.org
Subject: Re: [PATCH v2 3/3] Documentation: ABI: iio: Add event when offset/scale changes
Date: Sun, 6 Sep 2020 16:31:55 +0100	[thread overview]
Message-ID: <20200906163155.4d9f0259@archlinux> (raw)
In-Reply-To: <20200901030017.3221295-4-gwendal@chromium.org>

On Mon, 31 Aug 2020 20:00:17 -0700
Gwendal Grignou <gwendal@chromium.org> wrote:

> Some sensors/sensorhubs can calculate drift or hard iron offsets to
> apply to raw data to get the true measure data.
> These offsets are applied by the user space application.
> When these offsets change, events are raised to tell the application
> to update the cached offset values.
> 
> Signed-off-by: Gwendal Grignou <gwendal@chromium.org>

I'm fine with this, but would like to give a bit more time for others to
comment.  Also you left the version number as wild cards.
I guess I can fix that, but I've been known to miss such things
so better to be optimistic and put in 5.10.

However I don't really want to see ABI without a user so I'd rather 
see this patch alongside the driver update.

Thanks,

Jonathan

> ---
> Changes since v1:
> - Define metadata_en instead of offset/scale_en to limit race
>   conditions.
>  Documentation/ABI/testing/sysfs-bus-iio | 13 +++++++++++++
>  1 file changed, 13 insertions(+)
> 
> diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
> index f77aee8886c66..45f456de1621a 100644
> --- a/Documentation/ABI/testing/sysfs-bus-iio
> +++ b/Documentation/ABI/testing/sysfs-bus-iio
> @@ -1735,3 +1735,16 @@ Contact:	linux-iio@vger.kernel.org
>  Description:
>  		Hard Iron bias calculated by the sensor or sensorhub. To be applied by
>  		user space application to the raw data to obtain the geomagnetic field.
> +
> +What:		/sys/.../iio:deviceX/events/in_accel_metadata_change_en
> +What:		/sys/.../iio:deviceX/events/in_magn_metadata_change_en
> +What:		/sys/.../iio:deviceX/events/in_anglvel_metadata_change_en

I've just been looking at existing naming of events and thinking about whether
we should have a space between metadata and change. From a human readabilty
point of view it would be nice, but from a parsability viewpoint possibly not.

We do have precedent though for such a space (even if we wouldn't have done
it today) in thresh_adaptive and mag_adaptive (see industrialio-event.c) so
I guess one more probably doesn't hurt too much.


> +KernelVersion:	x.y

Be an optimist for patches like this and put the next cycle in there. That's
better than some maintainers just picking it up with wild cards :)

> +Contact:	linux-iio@vger.kernel.org
> +Description:
> +		Some sensors internally calculate offset to apply to remove bias (for
> +		instance, hard/soft-iron bias for magnetometer, online calibration bias for
> +		gyroscope or accelerometer).
> +		When the sensor computes a new set of offset values, it generates an
> +		event for the userspace application to refresh the offsets to apply to raw
> +		data.


      reply	other threads:[~2020-09-06 15:32 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-01  3:00 [PATCH v2 0/3] docs: abi: iio: RFC: Request to add event when offsets calculated by sensorhub change Gwendal Grignou
2020-09-01  3:00 ` [PATCH v2 1/3] Documentation: ABI: iio: Use What: consistently Gwendal Grignou
2020-09-06 15:24   ` Jonathan Cameron
2020-09-01  3:00 ` [PATCH v2 2/3] Documentation: ABI: iio: Add offsets for some sensors Gwendal Grignou
2020-09-06 15:38   ` Jonathan Cameron
2020-09-01  3:00 ` [PATCH v2 3/3] Documentation: ABI: iio: Add event when offset/scale changes Gwendal Grignou
2020-09-06 15:31   ` 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=20200906163155.4d9f0259@archlinux \
    --to=jic23@kernel.org \
    --cc=enric.balletbo@collabora.com \
    --cc=gwendal@chromium.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=peress@chromium.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