From: Jonathan Cameron <jic23@kernel.org>
To: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
Cc: linux-iio@vger.kernel.org
Subject: Re: [PATCH 2/3] iio: Add modifier for UV index
Date: Wed, 16 Mar 2016 20:41:53 +0000 [thread overview]
Message-ID: <56E9C511.8010808@kernel.org> (raw)
In-Reply-To: <1458090376-26729-2-git-send-email-pmeerw@pmeerw.net>
On 16/03/16 01:06, Peter Meerwald-Stadler wrote:
> UV index indicating strength of sunburn-producing ultraviolet (UV) radiation
>
> Signed-off-by: Peter Meerwald-Stadler <pmeerw@pmeerw.net>
I'm not sure this wants to be a modifier rather than a new channel type
entirely. So far modifiers have been about 'direction' defined loosely
or something computational based on direction (root mean square etc)
I'd have in_uvindexX_input etc
This is kind of similar to illuminance in that it is a magic computed
wavelength dependent number that is some sort of weighted sum of
energies at different frequencies (assuming I read the wikipedia article
right!)
Jonathan
> ---
> Documentation/ABI/testing/sysfs-bus-iio | 9 +++++++++
> drivers/iio/industrialio-core.c | 1 +
> include/uapi/linux/iio/types.h | 1 +
> tools/iio/iio_event_monitor.c | 2 ++
> 4 files changed, 13 insertions(+)
>
> diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
> index 6fb9180..26da49b 100644
> --- a/Documentation/ABI/testing/sysfs-bus-iio
> +++ b/Documentation/ABI/testing/sysfs-bus-iio
> @@ -1264,6 +1264,15 @@ Description:
> components or just infrared light, respectively. Modifier uv indicates
> that measurements contain ultraviolet light components.
>
> +What: /sys/.../iio:deviceX/in_intensityY_uv_index_input
> +KernelVersion: 4.6
> +Contact: linux-iio@vger.kernel.org
> +Description:
> + UV light intensity index measuring the human skin's response to
> + different wavelength of sunlight weighted according to the
> + standardised CIE Erythemal Action Spectrum. UV index values range
> + from 0 (low) to >=11 (extreme).
> +
> What: /sys/.../iio:deviceX/in_intensity_red_integration_time
> What: /sys/.../iio:deviceX/in_intensity_green_integration_time
> What: /sys/.../iio:deviceX/in_intensity_blue_integration_time
> diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
> index 88353ae..420aa06 100644
> --- a/drivers/iio/industrialio-core.c
> +++ b/drivers/iio/industrialio-core.c
> @@ -102,6 +102,7 @@ static const char * const iio_modifier_names[] = {
> [IIO_MOD_LIGHT_GREEN] = "green",
> [IIO_MOD_LIGHT_BLUE] = "blue",
> [IIO_MOD_LIGHT_UV] = "uv",
> + [IIO_MOD_LIGHT_UV_INDEX] = "uv_index",
> [IIO_MOD_QUATERNION] = "quaternion",
> [IIO_MOD_TEMP_AMBIENT] = "ambient",
> [IIO_MOD_TEMP_OBJECT] = "object",
> diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h
> index 9337ece..0946c3e 100644
> --- a/include/uapi/linux/iio/types.h
> +++ b/include/uapi/linux/iio/types.h
> @@ -78,6 +78,7 @@ enum iio_modifier {
> IIO_MOD_CO2,
> IIO_MOD_VOC,
> IIO_MOD_LIGHT_UV,
> + IIO_MOD_LIGHT_UV_INDEX,
> };
>
> enum iio_event_type {
> diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c
> index 8d7d979..0965349 100644
> --- a/tools/iio/iio_event_monitor.c
> +++ b/tools/iio/iio_event_monitor.c
> @@ -94,6 +94,7 @@ static const char * const iio_modifier_names[] = {
> [IIO_MOD_LIGHT_GREEN] = "green",
> [IIO_MOD_LIGHT_BLUE] = "blue",
> [IIO_MOD_LIGHT_UV] = "uv",
> + [IIO_MOD_LIGHT_UV_INDEX] = "uv_index",
> [IIO_MOD_QUATERNION] = "quaternion",
> [IIO_MOD_TEMP_AMBIENT] = "ambient",
> [IIO_MOD_TEMP_OBJECT] = "object",
> @@ -174,6 +175,7 @@ static bool event_is_known(struct iio_event_data *event)
> case IIO_MOD_LIGHT_GREEN:
> case IIO_MOD_LIGHT_BLUE:
> case IIO_MOD_LIGHT_UV:
> + case IIO_MOD_LIGHT_UV_INDEX:
> case IIO_MOD_QUATERNION:
> case IIO_MOD_TEMP_AMBIENT:
> case IIO_MOD_TEMP_OBJECT:
>
next prev parent reply other threads:[~2016-03-16 20:41 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-03-16 1:06 [PATCH 1/3] iio: Add modifier for UV light Peter Meerwald-Stadler
2016-03-16 1:06 ` [PATCH 2/3] iio: Add modifier for UV index Peter Meerwald-Stadler
2016-03-16 20:41 ` Jonathan Cameron [this message]
2016-03-16 1:06 ` [PATCH 3/3] iio: Add Vishay VEML6070 UV A light sensor driver Peter Meerwald-Stadler
2016-03-16 20:48 ` Jonathan Cameron
2016-03-17 17:35 ` [PATCH 1/3] iio: Add modifier for UV light Matt Ranostay
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=56E9C511.8010808@kernel.org \
--to=jic23@kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=pmeerw@pmeerw.net \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.