Linux IIO development
 help / color / mirror / Atom feed
From: "Nuno Sá" <noname.nuno@gmail.com>
To: Guillaume Ranquet <granquet@baylibre.com>,
	Lars-Peter Clausen <lars@metafoo.de>,
	Michael Hennerich <Michael.Hennerich@analog.com>,
	 Jonathan Cameron <jic23@kernel.org>
Cc: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 1/2] iio: introduce the FAULT event type
Date: Mon, 20 Jan 2025 16:50:52 +0000	[thread overview]
Message-ID: <90dda46c3858a7bfa512d3f63d1bd1613bb2dfed.camel@gmail.com> (raw)
In-Reply-To: <20250120-ad4111_openwire-v4-1-e647835dbe62@baylibre.com>

On Mon, 2025-01-20 at 15:10 +0100, Guillaume Ranquet wrote:
> Add a new event type to describe an hardware failure.
> 
> Signed-off-by: Guillaume Ranquet <granquet@baylibre.com>
> ---

Reviewed-by: Nuno Sa <nuno.sa@analog.com>

>  drivers/iio/industrialio-event.c | 2 ++
>  include/uapi/linux/iio/types.h   | 2 ++
>  tools/iio/iio_event_monitor.c    | 4 ++++
>  3 files changed, 8 insertions(+)
> 
> diff --git a/drivers/iio/industrialio-event.c b/drivers/iio/industrialio-
> event.c
> index
> db06501b0e61a91e3b06345b418504803f4aefb5..06295cfc2da8b1df17061cf58ade38d88020
> 359e 100644
> --- a/drivers/iio/industrialio-event.c
> +++ b/drivers/iio/industrialio-event.c
> @@ -232,6 +232,7 @@ static const char * const iio_ev_type_text[] = {
>  	[IIO_EV_TYPE_CHANGE] = "change",
>  	[IIO_EV_TYPE_MAG_REFERENCED] = "mag_referenced",
>  	[IIO_EV_TYPE_GESTURE] = "gesture",
> +	[IIO_EV_TYPE_FAULT] = "fault",
>  };
>  
>  static const char * const iio_ev_dir_text[] = {
> @@ -240,6 +241,7 @@ static const char * const iio_ev_dir_text[] = {
>  	[IIO_EV_DIR_FALLING] = "falling",
>  	[IIO_EV_DIR_SINGLETAP] = "singletap",
>  	[IIO_EV_DIR_DOUBLETAP] = "doubletap",
> +	[IIO_EV_DIR_FAULT_OPENWIRE] = "openwire",
>  };
>  
>  static const char * const iio_ev_info_text[] = {
> diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h
> index
> 12886d4465e4896aedce837c2df63c78f83a5496..3eb0821af7a40e29544fbcc67c48e085507e
> 13d0 100644
> --- a/include/uapi/linux/iio/types.h
> +++ b/include/uapi/linux/iio/types.h
> @@ -119,6 +119,7 @@ enum iio_event_type {
>  	IIO_EV_TYPE_CHANGE,
>  	IIO_EV_TYPE_MAG_REFERENCED,
>  	IIO_EV_TYPE_GESTURE,
> +	IIO_EV_TYPE_FAULT,
>  };
>  
>  enum iio_event_direction {
> @@ -128,6 +129,7 @@ enum iio_event_direction {
>  	IIO_EV_DIR_NONE,
>  	IIO_EV_DIR_SINGLETAP,
>  	IIO_EV_DIR_DOUBLETAP,
> +	IIO_EV_DIR_FAULT_OPENWIRE,
>  };
>  
>  #endif /* _UAPI_IIO_TYPES_H_ */
> diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c
> index
> cccf62ea2b8f9b55a83a4960c1a60087c7b053f3..eab7b082f19db8703aca55af7dbf4f1d624a
> a3af 100644
> --- a/tools/iio/iio_event_monitor.c
> +++ b/tools/iio/iio_event_monitor.c
> @@ -75,6 +75,7 @@ static const char * const iio_ev_type_text[] = {
>  	[IIO_EV_TYPE_CHANGE] = "change",
>  	[IIO_EV_TYPE_MAG_REFERENCED] = "mag_referenced",
>  	[IIO_EV_TYPE_GESTURE] = "gesture",
> +	[IIO_EV_TYPE_FAULT] = "fault",
>  };
>  
>  static const char * const iio_ev_dir_text[] = {
> @@ -83,6 +84,7 @@ static const char * const iio_ev_dir_text[] = {
>  	[IIO_EV_DIR_FALLING] = "falling",
>  	[IIO_EV_DIR_SINGLETAP] = "singletap",
>  	[IIO_EV_DIR_DOUBLETAP] = "doubletap",
> +	[IIO_EV_DIR_FAULT_OPENWIRE] = "openwire",
>  };
>  
>  static const char * const iio_modifier_names[] = {
> @@ -249,6 +251,7 @@ static bool event_is_known(struct iio_event_data *event)
>  	case IIO_EV_TYPE_MAG_ADAPTIVE:
>  	case IIO_EV_TYPE_CHANGE:
>  	case IIO_EV_TYPE_GESTURE:
> +	case IIO_EV_TYPE_FAULT:
>  		break;
>  	default:
>  		return false;
> @@ -260,6 +263,7 @@ static bool event_is_known(struct iio_event_data *event)
>  	case IIO_EV_DIR_FALLING:
>  	case IIO_EV_DIR_SINGLETAP:
>  	case IIO_EV_DIR_DOUBLETAP:
> +	case IIO_EV_DIR_FAULT_OPENWIRE:
>  	case IIO_EV_DIR_NONE:
>  		break;
>  	default:
> 


  reply	other threads:[~2025-01-20 16:50 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-20 14:10 [PATCH v4 0/2] iio: adc: ad7173: add ad4111 openwire detection support Guillaume Ranquet
2025-01-20 14:10 ` [PATCH v4 1/2] iio: introduce the FAULT event type Guillaume Ranquet
2025-01-20 16:50   ` Nuno Sá [this message]
2025-01-20 14:10 ` [PATCH v4 2/2] iio: adc: ad7173: add openwire detection support for single conversions Guillaume Ranquet
2025-01-20 17:07   ` Nuno Sá
2025-01-25 14:45     ` 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=90dda46c3858a7bfa512d3f63d1bd1613bb2dfed.camel@gmail.com \
    --to=noname.nuno@gmail.com \
    --cc=Michael.Hennerich@analog.com \
    --cc=granquet@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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