* [PATCH 1/2] iio: Add support for humidity sensors
@ 2013-10-22 16:44 Harald Geyer
2013-10-24 8:36 ` Jonathan Cameron
0 siblings, 1 reply; 2+ messages in thread
From: Harald Geyer @ 2013-10-22 16:44 UTC (permalink / raw)
To: linux-iio
There are already humidity sensors in the hwmon subsystem,
so we use their unit (milli percent) here as well.
Signed-off-by: Harald Geyer <harald@ccbib.org>
---
Reposting this unchanged (except for the kernel verion update in
the ABI document) from the patch I sent two month ago, as I didn't
get any feedback back then.
Documentation/ABI/testing/sysfs-bus-iio | 13 +++++++++++++
drivers/iio/industrialio-core.c | 1 +
include/linux/iio/types.h | 1 +
3 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
index 39c8de0..76f8f08 100644
--- a/Documentation/ABI/testing/sysfs-bus-iio
+++ b/Documentation/ABI/testing/sysfs-bus-iio
@@ -197,6 +197,19 @@ Description:
Raw pressure measurement from channel Y. Units after
application of scale and offset are kilopascal.
+What: /sys/bus/iio/devices/iio:deviceX/in_humidityrelative_raw
+KernelVersion: 3.13
+Contact: linux-iio@vger.kernel.org
+Description:
+ Raw humidity measurement of air. Units after application of
+ scale and offset are milli percent.
+
+What: /sys/bus/iio/devices/iio:deviceX/in_humidityrelative_input
+KernelVersion: 3.13
+Contact: linux-iio@vger.kernel.org
+Description:
+ Scaled humidity measurement in milli percent.
+
What: /sys/bus/iio/devices/iio:deviceX/in_accel_offset
What: /sys/bus/iio/devices/iio:deviceX/in_accel_x_offset
What: /sys/bus/iio/devices/iio:deviceX/in_accel_y_offset
diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
index f95c697..5062987 100644
--- a/drivers/iio/industrialio-core.c
+++ b/drivers/iio/industrialio-core.c
@@ -66,6 +66,7 @@ static const char * const iio_chan_type_name_spec[] = {
[IIO_ALTVOLTAGE] = "altvoltage",
[IIO_CCT] = "cct",
[IIO_PRESSURE] = "pressure",
+ [IIO_HUMIDITYRELATIVE] = "humidityrelative",
};
static const char * const iio_modifier_names[] = {
diff --git a/include/linux/iio/types.h b/include/linux/iio/types.h
index 88bf0f0..f822b3d 100644
--- a/include/linux/iio/types.h
+++ b/include/linux/iio/types.h
@@ -29,6 +29,7 @@ enum iio_chan_type {
IIO_ALTVOLTAGE,
IIO_CCT,
IIO_PRESSURE,
+ IIO_HUMIDITYRELATIVE,
};
enum iio_modifier {
--
1.7.2.5
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH 1/2] iio: Add support for humidity sensors
2013-10-22 16:44 [PATCH 1/2] iio: Add support for humidity sensors Harald Geyer
@ 2013-10-24 8:36 ` Jonathan Cameron
0 siblings, 0 replies; 2+ messages in thread
From: Jonathan Cameron @ 2013-10-24 8:36 UTC (permalink / raw)
To: Harald Geyer, linux-iio
On 10/22/13 17:44, Harald Geyer wrote:
> There are already humidity sensors in the hwmon subsystem,
> so we use their unit (milli percent) here as well.
>
> Signed-off-by: Harald Geyer <harald@ccbib.org>
> ---
> Reposting this unchanged (except for the kernel verion update in
> the ABI document) from the patch I sent two month ago, as I didn't
> get any feedback back then.
It's fine (sorry should have said). I won't merge it until the accompanying driver is
ready to go. Right now I'm leaving reviewing that to Peter who is doing a great job :)
(the driver looks more or less fine to me as well).
>
> Documentation/ABI/testing/sysfs-bus-iio | 13 +++++++++++++
> drivers/iio/industrialio-core.c | 1 +
> include/linux/iio/types.h | 1 +
> 3 files changed, 15 insertions(+), 0 deletions(-)
>
> diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
> index 39c8de0..76f8f08 100644
> --- a/Documentation/ABI/testing/sysfs-bus-iio
> +++ b/Documentation/ABI/testing/sysfs-bus-iio
> @@ -197,6 +197,19 @@ Description:
> Raw pressure measurement from channel Y. Units after
> application of scale and offset are kilopascal.
>
> +What: /sys/bus/iio/devices/iio:deviceX/in_humidityrelative_raw
> +KernelVersion: 3.13
> +Contact: linux-iio@vger.kernel.org
> +Description:
> + Raw humidity measurement of air. Units after application of
> + scale and offset are milli percent.
> +
> +What: /sys/bus/iio/devices/iio:deviceX/in_humidityrelative_input
> +KernelVersion: 3.13
> +Contact: linux-iio@vger.kernel.org
> +Description:
> + Scaled humidity measurement in milli percent.
> +
> What: /sys/bus/iio/devices/iio:deviceX/in_accel_offset
> What: /sys/bus/iio/devices/iio:deviceX/in_accel_x_offset
> What: /sys/bus/iio/devices/iio:deviceX/in_accel_y_offset
> diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
> index f95c697..5062987 100644
> --- a/drivers/iio/industrialio-core.c
> +++ b/drivers/iio/industrialio-core.c
> @@ -66,6 +66,7 @@ static const char * const iio_chan_type_name_spec[] = {
> [IIO_ALTVOLTAGE] = "altvoltage",
> [IIO_CCT] = "cct",
> [IIO_PRESSURE] = "pressure",
> + [IIO_HUMIDITYRELATIVE] = "humidityrelative",
> };
>
> static const char * const iio_modifier_names[] = {
> diff --git a/include/linux/iio/types.h b/include/linux/iio/types.h
> index 88bf0f0..f822b3d 100644
> --- a/include/linux/iio/types.h
> +++ b/include/linux/iio/types.h
> @@ -29,6 +29,7 @@ enum iio_chan_type {
> IIO_ALTVOLTAGE,
> IIO_CCT,
> IIO_PRESSURE,
> + IIO_HUMIDITYRELATIVE,
> };
>
> enum iio_modifier {
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2013-10-24 7:35 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-22 16:44 [PATCH 1/2] iio: Add support for humidity sensors Harald Geyer
2013-10-24 8:36 ` Jonathan Cameron
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.