Linux-IIO Archive on lore.kernel.org
 help / Atom feed
* [PATCH v3 1/3] iio: Add modifiers for ethanol and H2 gases
@ 2018-12-13 14:43 Andreas Brauchli
  2018-12-14 18:06 ` Matt Ranostay
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Brauchli @ 2018-12-13 14:43 UTC (permalink / raw)
  To: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler
  Cc: linux-kernel, linux-iio, Andreas Brauchli

Add ethanol and H2 gas modifiers:
* IIO_MOD_ETHANOL
* IIO_MOD_H2

Signed-off-by: Andreas Brauchli <andreas.brauchli@sensirion.com>
---
 Documentation/ABI/testing/sysfs-bus-iio | 4 ++++
 include/uapi/linux/iio/types.h          | 2 ++
 tools/iio/iio_event_monitor.c           | 4 ++++
 3 files changed, 10 insertions(+)

diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
index 8127a08e366d..6d64521bf565 100644
--- a/Documentation/ABI/testing/sysfs-bus-iio
+++ b/Documentation/ABI/testing/sysfs-bus-iio
@@ -1554,6 +1554,10 @@ 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_ethanol_raw
+What:		/sys/bus/iio/devices/iio:deviceX/in_concentrationX_ethanol_raw
+What:		/sys/bus/iio/devices/iio:deviceX/in_concentration_h2_raw
+What:		/sys/bus/iio/devices/iio:deviceX/in_concentrationX_h2_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
diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h
index 92baabc103ac..04a6649fa442 100644
--- a/include/uapi/linux/iio/types.h
+++ b/include/uapi/linux/iio/types.h
@@ -87,6 +87,8 @@ enum iio_modifier {
 	IIO_MOD_VOC,
 	IIO_MOD_LIGHT_UV,
 	IIO_MOD_LIGHT_DUV,
+	IIO_MOD_ETHANOL,
+	IIO_MOD_H2,
 };
 
 enum iio_event_type {
diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c
index ac2de6b7e89f..f29c885f4b28 100644
--- a/tools/iio/iio_event_monitor.c
+++ b/tools/iio/iio_event_monitor.c
@@ -114,6 +114,8 @@ static const char * const iio_modifier_names[] = {
 	[IIO_MOD_I] = "i",
 	[IIO_MOD_Q] = "q",
 	[IIO_MOD_CO2] = "co2",
+	[IIO_MOD_ETHANOL] = "ethanol",
+	[IIO_MOD_H2] = "h2",
 	[IIO_MOD_VOC] = "voc",
 };
 
@@ -199,6 +201,8 @@ static bool event_is_known(struct iio_event_data *event)
 	case IIO_MOD_I:
 	case IIO_MOD_Q:
 	case IIO_MOD_CO2:
+	case IIO_MOD_ETHANOL:
+	case IIO_MOD_H2:
 	case IIO_MOD_VOC:
 		break;
 	default:
-- 
2.17.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3 1/3] iio: Add modifiers for ethanol and H2 gases
  2018-12-13 14:43 [PATCH v3 1/3] iio: Add modifiers for ethanol and H2 gases Andreas Brauchli
@ 2018-12-14 18:06 ` Matt Ranostay
  2018-12-16 13:20   ` Jonathan Cameron
  0 siblings, 1 reply; 3+ messages in thread
From: Matt Ranostay @ 2018-12-14 18:06 UTC (permalink / raw)
  To: Andreas Brauchli
  Cc: Jonathan Cameron, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler, linux-kernel, linux-iio,
	Andreas Brauchli

On Thu, Dec 13, 2018 at 6:44 AM Andreas Brauchli
<a.brauchli@elementarea.net> wrote:
>
> Add ethanol and H2 gas modifiers:
> * IIO_MOD_ETHANOL

Was going to ask why this wasn't a chemical formula like the rest of
the modifiers, but C2H6O would be a bit wordy/unclear :).

> * IIO_MOD_H2
>

Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>

> Signed-off-by: Andreas Brauchli <andreas.brauchli@sensirion.com>
> ---
>  Documentation/ABI/testing/sysfs-bus-iio | 4 ++++
>  include/uapi/linux/iio/types.h          | 2 ++
>  tools/iio/iio_event_monitor.c           | 4 ++++
>  3 files changed, 10 insertions(+)
>
> diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
> index 8127a08e366d..6d64521bf565 100644
> --- a/Documentation/ABI/testing/sysfs-bus-iio
> +++ b/Documentation/ABI/testing/sysfs-bus-iio
> @@ -1554,6 +1554,10 @@ 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_ethanol_raw
> +What:          /sys/bus/iio/devices/iio:deviceX/in_concentrationX_ethanol_raw
> +What:          /sys/bus/iio/devices/iio:deviceX/in_concentration_h2_raw
> +What:          /sys/bus/iio/devices/iio:deviceX/in_concentrationX_h2_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
> diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h
> index 92baabc103ac..04a6649fa442 100644
> --- a/include/uapi/linux/iio/types.h
> +++ b/include/uapi/linux/iio/types.h
> @@ -87,6 +87,8 @@ enum iio_modifier {
>         IIO_MOD_VOC,
>         IIO_MOD_LIGHT_UV,
>         IIO_MOD_LIGHT_DUV,
> +       IIO_MOD_ETHANOL,
> +       IIO_MOD_H2,
>  };
>
>  enum iio_event_type {
> diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c
> index ac2de6b7e89f..f29c885f4b28 100644
> --- a/tools/iio/iio_event_monitor.c
> +++ b/tools/iio/iio_event_monitor.c
> @@ -114,6 +114,8 @@ static const char * const iio_modifier_names[] = {
>         [IIO_MOD_I] = "i",
>         [IIO_MOD_Q] = "q",
>         [IIO_MOD_CO2] = "co2",
> +       [IIO_MOD_ETHANOL] = "ethanol",
> +       [IIO_MOD_H2] = "h2",
>         [IIO_MOD_VOC] = "voc",
>  };
>
> @@ -199,6 +201,8 @@ static bool event_is_known(struct iio_event_data *event)
>         case IIO_MOD_I:
>         case IIO_MOD_Q:
>         case IIO_MOD_CO2:
> +       case IIO_MOD_ETHANOL:
> +       case IIO_MOD_H2:
>         case IIO_MOD_VOC:
>                 break;
>         default:
> --
> 2.17.1
>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH v3 1/3] iio: Add modifiers for ethanol and H2 gases
  2018-12-14 18:06 ` Matt Ranostay
@ 2018-12-16 13:20   ` Jonathan Cameron
  0 siblings, 0 replies; 3+ messages in thread
From: Jonathan Cameron @ 2018-12-16 13:20 UTC (permalink / raw)
  To: Matt Ranostay
  Cc: Andreas Brauchli, Hartmut Knaack, Lars-Peter Clausen,
	Peter Meerwald-Stadler, linux-kernel, linux-iio,
	Andreas Brauchli

On Fri, 14 Dec 2018 10:06:39 -0800
Matt Ranostay <matt.ranostay@konsulko.com> wrote:

> On Thu, Dec 13, 2018 at 6:44 AM Andreas Brauchli
> <a.brauchli@elementarea.net> wrote:
> >
> > Add ethanol and H2 gas modifiers:
> > * IIO_MOD_ETHANOL  
> 
> Was going to ask why this wasn't a chemical formula like the rest of
> the modifiers, but C2H6O would be a bit wordy/unclear :).
> 
> > * IIO_MOD_H2
> >  
> 
> Acked-by: Matt Ranostay <matt.ranostay@konsulko.com>

There was a bit of fuzz due to crossing with the particle sensor.
Note that it changed the enum numbers so you'll need to rebuild
your own tools against the new version of the header.

Applied to the togreg branch of iio.git and pushed out as testing
for the autobuilders to play with it.

Thanks,

Jonathan

> 
> > Signed-off-by: Andreas Brauchli <andreas.brauchli@sensirion.com>
> > ---
> >  Documentation/ABI/testing/sysfs-bus-iio | 4 ++++
> >  include/uapi/linux/iio/types.h          | 2 ++
> >  tools/iio/iio_event_monitor.c           | 4 ++++
> >  3 files changed, 10 insertions(+)
> >
> > diff --git a/Documentation/ABI/testing/sysfs-bus-iio b/Documentation/ABI/testing/sysfs-bus-iio
> > index 8127a08e366d..6d64521bf565 100644
> > --- a/Documentation/ABI/testing/sysfs-bus-iio
> > +++ b/Documentation/ABI/testing/sysfs-bus-iio
> > @@ -1554,6 +1554,10 @@ 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_ethanol_raw
> > +What:          /sys/bus/iio/devices/iio:deviceX/in_concentrationX_ethanol_raw
> > +What:          /sys/bus/iio/devices/iio:deviceX/in_concentration_h2_raw
> > +What:          /sys/bus/iio/devices/iio:deviceX/in_concentrationX_h2_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
> > diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h
> > index 92baabc103ac..04a6649fa442 100644
> > --- a/include/uapi/linux/iio/types.h
> > +++ b/include/uapi/linux/iio/types.h
> > @@ -87,6 +87,8 @@ enum iio_modifier {
> >         IIO_MOD_VOC,
> >         IIO_MOD_LIGHT_UV,
> >         IIO_MOD_LIGHT_DUV,
> > +       IIO_MOD_ETHANOL,
> > +       IIO_MOD_H2,
> >  };
> >
> >  enum iio_event_type {
> > diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c
> > index ac2de6b7e89f..f29c885f4b28 100644
> > --- a/tools/iio/iio_event_monitor.c
> > +++ b/tools/iio/iio_event_monitor.c
> > @@ -114,6 +114,8 @@ static const char * const iio_modifier_names[] = {
> >         [IIO_MOD_I] = "i",
> >         [IIO_MOD_Q] = "q",
> >         [IIO_MOD_CO2] = "co2",
> > +       [IIO_MOD_ETHANOL] = "ethanol",
> > +       [IIO_MOD_H2] = "h2",
> >         [IIO_MOD_VOC] = "voc",
> >  };
> >
> > @@ -199,6 +201,8 @@ static bool event_is_known(struct iio_event_data *event)
> >         case IIO_MOD_I:
> >         case IIO_MOD_Q:
> >         case IIO_MOD_CO2:
> > +       case IIO_MOD_ETHANOL:
> > +       case IIO_MOD_H2:
> >         case IIO_MOD_VOC:
> >                 break;
> >         default:
> > --
> > 2.17.1
> >  


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-12-13 14:43 [PATCH v3 1/3] iio: Add modifiers for ethanol and H2 gases Andreas Brauchli
2018-12-14 18:06 ` Matt Ranostay
2018-12-16 13:20   ` Jonathan Cameron

Linux-IIO Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-iio/0 linux-iio/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-iio linux-iio/ https://lore.kernel.org/linux-iio \
		linux-iio@vger.kernel.org linux-iio@archiver.kernel.org
	public-inbox-index linux-iio


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.linux-iio


AGPL code for this site: git clone https://public-inbox.org/ public-inbox