Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1223823 > unrolled thread
| Started by | Matt Ranostay <mranostay@gmail.com> |
|---|---|
| First post | 2015-09-14 05:30 +0200 |
| Last post | 2015-09-20 21:00 +0200 |
| Articles | 7 — 2 participants |
Back to article view | Back to linux.kernel
[PATCH v5 0/4] iio: new chemical sensor framework and channel types Matt Ranostay <mranostay@gmail.com> - 2015-09-14 05:30 +0200
[PATCH v5 1/4] iio: chemical: Add IIO_CONCENTRATION channel type Matt Ranostay <mranostay@gmail.com> - 2015-09-14 05:30 +0200
Re: [PATCH v5 1/4] iio: chemical: Add IIO_CONCENTRATION channel type Jonathan Cameron <jic23@kernel.org> - 2015-09-20 21:00 +0200
[PATCH v5 3/4] devicetree: add SGX Sensortech vendor id Matt Ranostay <mranostay@gmail.com> - 2015-09-14 05:30 +0200
Re: [PATCH v5 3/4] devicetree: add SGX Sensortech vendor id Jonathan Cameron <jic23@kernel.org> - 2015-09-20 21:00 +0200
[PATCH v5 2/4] iio: resistance: add IIO_RESISTANCE channel type Matt Ranostay <mranostay@gmail.com> - 2015-09-14 05:30 +0200
Re: [PATCH v5 2/4] iio: resistance: add IIO_RESISTANCE channel type Jonathan Cameron <jic23@kernel.org> - 2015-09-20 21:00 +0200
| From | Matt Ranostay <mranostay@gmail.com> |
|---|---|
| Date | 2015-09-14 05:30 +0200 |
| Subject | [PATCH v5 0/4] iio: new chemical sensor framework and channel types |
| Message-ID | <q8sCS-2qP-5@gated-at.bofh.it> |
Changes from v4: * Add IIO_MOD_CO2 and IIO_MOD_VOC modifiers * Updated IIO_RESISTANCE and IIO_CONCENTRATION documentation * Moved the decimal point shifting to the scale value versus the reading Matt Ranostay (4): iio: chemical: Add IIO_CONCENTRATION channel type iio: resistance: add IIO_RESISTANCE channel type devicetree: add SGX Sensortech vendor id iio: chemical: add SGX VZ89x VOC sensor support Documentation/ABI/testing/sysfs-bus-iio | 19 ++ .../ABI/testing/sysfs-bus-iio-chemical-vz89x | 7 + .../devicetree/bindings/i2c/trivial-devices.txt | 1 + .../devicetree/bindings/vendor-prefixes.txt | 1 + drivers/iio/Kconfig | 1 + drivers/iio/Makefile | 1 + drivers/iio/chemical/Kconfig | 15 ++ drivers/iio/chemical/Makefile | 6 + drivers/iio/chemical/vz89x.c | 237 +++++++++++++++++++++ drivers/iio/industrialio-core.c | 4 + include/uapi/linux/iio/types.h | 4 + 11 files changed, 296 insertions(+) create mode 100644 Documentation/ABI/testing/sysfs-bus-iio-chemical-vz89x create mode 100644 drivers/iio/chemical/Kconfig create mode 100644 drivers/iio/chemical/Makefile create mode 100644 drivers/iio/chemical/vz89x.c -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [next] | [standalone]
| From | Matt Ranostay <mranostay@gmail.com> |
|---|---|
| Date | 2015-09-14 05:30 +0200 |
| Subject | [PATCH v5 1/4] iio: chemical: Add IIO_CONCENTRATION channel type |
| Message-ID | <q8sCT-2qP-17@gated-at.bofh.it> |
| In reply to | #1223823 |
There are air quality sensors that report data back in parts per million
of VOC (Volatile Organic Compounds) which are usually indexed from CO2
or another common pollutant.
This patchset adds an IIO_CONCENTRATION type that returns a percentage
of substance because no other channels types fit this use case.
Modifiers for IIO_MOD_CO2 and IIO_MOD_VOC gas types are defined.
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
---
Documentation/ABI/testing/sysfs-bus-iio | 11 +++++++++++
drivers/iio/industrialio-core.c | 3 +++
include/uapi/linux/iio/types.h | 3 +++
3 files changed, 17 insertions(+)
diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
index 42d360f..682c070 100644
--- a/Documentation/ABI/testing/sysfs-bus-iio
+++ b/Documentation/ABI/testing/sysfs-bus-iio
@@ -1459,3 +1459,14 @@ Description:
measurements and return the average value as output data. Each
value resulted from <type>[_name]_oversampling_ratio measurements
is considered as one sample for <type>[_name]_sampling_frequency.
+
+What: /sys/bus/iio/devices/iio:deviceX/in_concentration_raw
+What: /sys/bus/iio/devices/iio:deviceX/in_concentrationX_raw
+What: /sys/bus/iio/devices/iio:deviceX/in_concentration_co2_raw
+What: /sys/bus/iio/devices/iio:deviceX/in_concentrationX_co2_raw
+What: /sys/bus/iio/devices/iio:deviceX/in_concentration_voc_raw
+What: /sys/bus/iio/devices/iio:deviceX/in_concentrationX_voc_raw
+KernelVersion: 4.3
+Contact: linux-iio@vger.kernel.org
+Description:
+ Raw (unscaled no offset etc.) percentage reading of a substance.
diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
index b3fcc2c..8eb6064 100644
--- a/drivers/iio/industrialio-core.c
+++ b/drivers/iio/industrialio-core.c
@@ -75,6 +75,7 @@ static const char * const iio_chan_type_name_spec[] = {
[IIO_ENERGY] = "energy",
[IIO_DISTANCE] = "distance",
[IIO_VELOCITY] = "velocity",
+ [IIO_CONCENTRATION] = "concentration",
};
static const char * const iio_modifier_names[] = {
@@ -111,6 +112,8 @@ static const char * const iio_modifier_names[] = {
[IIO_MOD_ROOT_SUM_SQUARED_X_Y_Z] = "sqrt(x^2+y^2+z^2)",
[IIO_MOD_I] = "i",
[IIO_MOD_Q] = "q",
+ [IIO_MOD_CO2] = "co2",
+ [IIO_MOD_VOC] = "voc",
};
/* 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 2f8b117..1e4c4e3 100644
--- a/include/uapi/linux/iio/types.h
+++ b/include/uapi/linux/iio/types.h
@@ -35,6 +35,7 @@ enum iio_chan_type {
IIO_ENERGY,
IIO_DISTANCE,
IIO_VELOCITY,
+ IIO_CONCENTRATION,
};
enum iio_modifier {
@@ -72,6 +73,8 @@ enum iio_modifier {
IIO_MOD_ROOT_SUM_SQUARED_X_Y_Z,
IIO_MOD_I,
IIO_MOD_Q,
+ IIO_MOD_CO2,
+ IIO_MOD_VOC,
};
enum iio_event_type {
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Jonathan Cameron <jic23@kernel.org> |
|---|---|
| Date | 2015-09-20 21:00 +0200 |
| Subject | Re: [PATCH v5 1/4] iio: chemical: Add IIO_CONCENTRATION channel type |
| Message-ID | <qaS0a-8j8-3@gated-at.bofh.it> |
| In reply to | #1223824 |
On 14/09/15 04:26, Matt Ranostay wrote:
> There are air quality sensors that report data back in parts per million
> of VOC (Volatile Organic Compounds) which are usually indexed from CO2
> or another common pollutant.
>
> This patchset adds an IIO_CONCENTRATION type that returns a percentage
> of substance because no other channels types fit this use case.
> Modifiers for IIO_MOD_CO2 and IIO_MOD_VOC gas types are defined.
>
> Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Applied to the togreg branch of iio.git - initially pushed out as
testing for the autobuilders to play with it.
Thanks,
Jonathan
> ---
> Documentation/ABI/testing/sysfs-bus-iio | 11 +++++++++++
> drivers/iio/industrialio-core.c | 3 +++
> include/uapi/linux/iio/types.h | 3 +++
> 3 files changed, 17 insertions(+)
>
> diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
> index 42d360f..682c070 100644
> --- a/Documentation/ABI/testing/sysfs-bus-iio
> +++ b/Documentation/ABI/testing/sysfs-bus-iio
> @@ -1459,3 +1459,14 @@ Description:
> measurements and return the average value as output data. Each
> value resulted from <type>[_name]_oversampling_ratio measurements
> is considered as one sample for <type>[_name]_sampling_frequency.
> +
> +What: /sys/bus/iio/devices/iio:deviceX/in_concentration_raw
> +What: /sys/bus/iio/devices/iio:deviceX/in_concentrationX_raw
> +What: /sys/bus/iio/devices/iio:deviceX/in_concentration_co2_raw
> +What: /sys/bus/iio/devices/iio:deviceX/in_concentrationX_co2_raw
> +What: /sys/bus/iio/devices/iio:deviceX/in_concentration_voc_raw
> +What: /sys/bus/iio/devices/iio:deviceX/in_concentrationX_voc_raw
> +KernelVersion: 4.3
> +Contact: linux-iio@vger.kernel.org
> +Description:
> + Raw (unscaled no offset etc.) percentage reading of a substance.
> diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
> index b3fcc2c..8eb6064 100644
> --- a/drivers/iio/industrialio-core.c
> +++ b/drivers/iio/industrialio-core.c
> @@ -75,6 +75,7 @@ static const char * const iio_chan_type_name_spec[] = {
> [IIO_ENERGY] = "energy",
> [IIO_DISTANCE] = "distance",
> [IIO_VELOCITY] = "velocity",
> + [IIO_CONCENTRATION] = "concentration",
> };
>
> static const char * const iio_modifier_names[] = {
> @@ -111,6 +112,8 @@ static const char * const iio_modifier_names[] = {
> [IIO_MOD_ROOT_SUM_SQUARED_X_Y_Z] = "sqrt(x^2+y^2+z^2)",
> [IIO_MOD_I] = "i",
> [IIO_MOD_Q] = "q",
> + [IIO_MOD_CO2] = "co2",
> + [IIO_MOD_VOC] = "voc",
> };
>
> /* 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 2f8b117..1e4c4e3 100644
> --- a/include/uapi/linux/iio/types.h
> +++ b/include/uapi/linux/iio/types.h
> @@ -35,6 +35,7 @@ enum iio_chan_type {
> IIO_ENERGY,
> IIO_DISTANCE,
> IIO_VELOCITY,
> + IIO_CONCENTRATION,
> };
>
> enum iio_modifier {
> @@ -72,6 +73,8 @@ enum iio_modifier {
> IIO_MOD_ROOT_SUM_SQUARED_X_Y_Z,
> IIO_MOD_I,
> IIO_MOD_Q,
> + IIO_MOD_CO2,
> + IIO_MOD_VOC,
> };
>
> enum iio_event_type {
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Matt Ranostay <mranostay@gmail.com> |
|---|---|
| Date | 2015-09-14 05:30 +0200 |
| Subject | [PATCH v5 3/4] devicetree: add SGX Sensortech vendor id |
| Message-ID | <q8sCT-2qP-21@gated-at.bofh.it> |
| In reply to | #1223823 |
Signed-off-by: Matt Ranostay <mranostay@gmail.com> --- Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt index ac5f0c3..281e8f0 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.txt +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt @@ -191,6 +191,7 @@ sbs Smart Battery System schindler Schindler seagate Seagate Technology PLC semtech Semtech Corporation +sgx SGX Sensortech sharp Sharp Corporation sil Silicon Image silabs Silicon Laboratories -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Jonathan Cameron <jic23@kernel.org> |
|---|---|
| Date | 2015-09-20 21:00 +0200 |
| Subject | Re: [PATCH v5 3/4] devicetree: add SGX Sensortech vendor id |
| Message-ID | <qaS0a-8j8-5@gated-at.bofh.it> |
| In reply to | #1223825 |
On 14/09/15 04:26, Matt Ranostay wrote: > Signed-off-by: Matt Ranostay <mranostay@gmail.com> Applied. Note there was fuzz in my tree as I am lagging mainline somewhat. However it is pretty obvious how to fix up merge issues in this file so lets not worry about that ;) Jonathan > --- > Documentation/devicetree/bindings/vendor-prefixes.txt | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/Documentation/devicetree/bindings/vendor-prefixes.txt b/Documentation/devicetree/bindings/vendor-prefixes.txt > index ac5f0c3..281e8f0 100644 > --- a/Documentation/devicetree/bindings/vendor-prefixes.txt > +++ b/Documentation/devicetree/bindings/vendor-prefixes.txt > @@ -191,6 +191,7 @@ sbs Smart Battery System > schindler Schindler > seagate Seagate Technology PLC > semtech Semtech Corporation > +sgx SGX Sensortech > sharp Sharp Corporation > sil Silicon Image > silabs Silicon Laboratories > -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Matt Ranostay <mranostay@gmail.com> |
|---|---|
| Date | 2015-09-14 05:30 +0200 |
| Subject | [PATCH v5 2/4] iio: resistance: add IIO_RESISTANCE channel type |
| Message-ID | <q8sCT-2qP-19@gated-at.bofh.it> |
| In reply to | #1223823 |
Signed-off-by: Matt Ranostay <mranostay@gmail.com>
---
Documentation/ABI/testing/sysfs-bus-iio | 8 ++++++++
drivers/iio/industrialio-core.c | 1 +
include/uapi/linux/iio/types.h | 1 +
3 files changed, 10 insertions(+)
diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
index 682c070..a91af51 100644
--- a/Documentation/ABI/testing/sysfs-bus-iio
+++ b/Documentation/ABI/testing/sysfs-bus-iio
@@ -1470,3 +1470,11 @@ KernelVersion: 4.3
Contact: linux-iio@vger.kernel.org
Description:
Raw (unscaled no offset etc.) percentage reading of a substance.
+
+What: /sys/bus/iio/devices/iio:deviceX/in_resistance_raw
+What: /sys/bus/iio/devices/iio:deviceX/in_resistanceX_raw
+KernelVersion: 4.3
+Contact: linux-iio@vger.kernel.org
+Description:
+ Raw (unscaled no offset etc.) resistance reading that can be processed
+ into an ohm value.
diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
index 8eb6064..80439a6 100644
--- a/drivers/iio/industrialio-core.c
+++ b/drivers/iio/industrialio-core.c
@@ -76,6 +76,7 @@ static const char * const iio_chan_type_name_spec[] = {
[IIO_DISTANCE] = "distance",
[IIO_VELOCITY] = "velocity",
[IIO_CONCENTRATION] = "concentration",
+ [IIO_RESISTANCE] = "resistance",
};
static const char * const iio_modifier_names[] = {
diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h
index 1e4c4e3..7c63bd6 100644
--- a/include/uapi/linux/iio/types.h
+++ b/include/uapi/linux/iio/types.h
@@ -36,6 +36,7 @@ enum iio_chan_type {
IIO_DISTANCE,
IIO_VELOCITY,
IIO_CONCENTRATION,
+ IIO_RESISTANCE,
};
enum iio_modifier {
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [next] | [standalone]
| From | Jonathan Cameron <jic23@kernel.org> |
|---|---|
| Date | 2015-09-20 21:00 +0200 |
| Subject | Re: [PATCH v5 2/4] iio: resistance: add IIO_RESISTANCE channel type |
| Message-ID | <qaS0a-8j8-7@gated-at.bofh.it> |
| In reply to | #1223826 |
On 14/09/15 04:26, Matt Ranostay wrote:
> Signed-off-by: Matt Ranostay <mranostay@gmail.com>
Applied to the togreg branch of iio.git - initially pushed out as testing for the
autobuilders to play with it.
Thanks,
Jonathan
> ---
> Documentation/ABI/testing/sysfs-bus-iio | 8 ++++++++
> drivers/iio/industrialio-core.c | 1 +
> include/uapi/linux/iio/types.h | 1 +
> 3 files changed, 10 insertions(+)
>
> diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
> index 682c070..a91af51 100644
> --- a/Documentation/ABI/testing/sysfs-bus-iio
> +++ b/Documentation/ABI/testing/sysfs-bus-iio
> @@ -1470,3 +1470,11 @@ KernelVersion: 4.3
> Contact: linux-iio@vger.kernel.org
> Description:
> Raw (unscaled no offset etc.) percentage reading of a substance.
> +
> +What: /sys/bus/iio/devices/iio:deviceX/in_resistance_raw
> +What: /sys/bus/iio/devices/iio:deviceX/in_resistanceX_raw
> +KernelVersion: 4.3
> +Contact: linux-iio@vger.kernel.org
> +Description:
> + Raw (unscaled no offset etc.) resistance reading that can be processed
> + into an ohm value.
> diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c
> index 8eb6064..80439a6 100644
> --- a/drivers/iio/industrialio-core.c
> +++ b/drivers/iio/industrialio-core.c
> @@ -76,6 +76,7 @@ static const char * const iio_chan_type_name_spec[] = {
> [IIO_DISTANCE] = "distance",
> [IIO_VELOCITY] = "velocity",
> [IIO_CONCENTRATION] = "concentration",
> + [IIO_RESISTANCE] = "resistance",
> };
>
> static const char * const iio_modifier_names[] = {
> diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h
> index 1e4c4e3..7c63bd6 100644
> --- a/include/uapi/linux/iio/types.h
> +++ b/include/uapi/linux/iio/types.h
> @@ -36,6 +36,7 @@ enum iio_chan_type {
> IIO_DISTANCE,
> IIO_VELOCITY,
> IIO_CONCENTRATION,
> + IIO_RESISTANCE,
> };
>
> enum iio_modifier {
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web