From: Jonathan Cameron <jic23@jic23.retrosnub.co.uk>
To: Gwendal Grignou <gwendal@chromium.org>
Cc: robh+dt@kernel.org, lars@metafoo.de, swboyd@chromium.org,
andy.shevchenko@gmail.com, linux-iio@vger.kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH v3 1/4] iio: add IIO_MOD_REFERENCE modifier
Date: Thu, 16 Dec 2021 15:59:18 +0000 [thread overview]
Message-ID: <20211216155905.1fac607c@jic23-huawei> (raw)
In-Reply-To: <20211213024057.3824985-2-gwendal@chromium.org>
On Sun, 12 Dec 2021 18:40:54 -0800
Gwendal Grignou <gwendal@chromium.org> wrote:
> Add modifier IIO_MOD_REFERENCE for reporting sx9360 reference
> proximity measurement.
> All modifier must be defined for libiio to recognize
> |in_proximity_reference| as a channel.
>
> Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Hmm. So the question is whether this is a valid modifier.
I'm not totally convinced, because I can see we might well
get stacking cases say
iio_concentration_o2_reference
However we do have precedence with 'ambient' which applies
to temperature sensors.
The alternative here would be to have it as a normal indexed
channel but with a label saying it is the reference.
Would that work for this case? If I were doing the ambient
case again I'd use label for that as well, but label is a more
recent addition to the ABI.
> ---
> New in v3.
>
> drivers/iio/industrialio-core.c | 1 +
> include/uapi/linux/iio/types.h | 1 +
> 2 files changed, 2 insertions(+)
>
> diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
> index 20d5178ca0739a..2b272f54de8ae9 100644
> --- a/drivers/iio/industrialio-core.c
> +++ b/drivers/iio/industrialio-core.c
> @@ -134,6 +134,7 @@ static const char * const iio_modifier_names[] = {
> [IIO_MOD_ETHANOL] = "ethanol",
> [IIO_MOD_H2] = "h2",
> [IIO_MOD_O2] = "o2",
> + [IIO_MOD_REFERENCE] = "reference",
> };
>
> /* relies on pairs of these shared then separate */
> diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h
> index 48c13147c0a870..aa83a9b578502a 100644
> --- a/include/uapi/linux/iio/types.h
> +++ b/include/uapi/linux/iio/types.h
> @@ -95,6 +95,7 @@ enum iio_modifier {
> IIO_MOD_ETHANOL,
> IIO_MOD_H2,
> IIO_MOD_O2,
> + IIO_MOD_REFERENCE,
> };
>
> enum iio_event_type {
next prev parent reply other threads:[~2021-12-16 15:54 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-13 2:40 [PATCH v3 0/4] Add Semtech SX9360 SAR Sensor support Gwendal Grignou
2021-12-13 2:40 ` [PATCH v3 1/4] iio: add IIO_MOD_REFERENCE modifier Gwendal Grignou
2021-12-16 15:59 ` Jonathan Cameron [this message]
2021-12-17 20:24 ` Gwendal Grignou
2021-12-13 2:40 ` [PATCH v3 2/4] iio: proximity: Add sx9360 support Gwendal Grignou
2021-12-15 1:14 ` Stephen Boyd
2021-12-16 16:21 ` Jonathan Cameron
2021-12-18 0:27 ` Gwendal Grignou
2021-12-13 2:40 ` [PATCH v3 3/4] dt-bindings: iio: Add sx9360 binding Gwendal Grignou
2021-12-15 1:15 ` Stephen Boyd
2021-12-15 20:09 ` Rob Herring
2021-12-13 2:40 ` [PATCH v3 4/4] iio: sx9360: Add dt-binding support Gwendal Grignou
2021-12-15 1:16 ` Stephen Boyd
2021-12-16 16:23 ` Jonathan Cameron
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=20211216155905.1fac607c@jic23-huawei \
--to=jic23@jic23.retrosnub.co.uk \
--cc=andy.shevchenko@gmail.com \
--cc=devicetree@vger.kernel.org \
--cc=gwendal@chromium.org \
--cc=lars@metafoo.de \
--cc=linux-iio@vger.kernel.org \
--cc=robh+dt@kernel.org \
--cc=swboyd@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