Linux IIO development
 help / color / mirror / Atom feed
From: Guillaume Ranquet <granquet@baylibre.com>
To: 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,
	 Guillaume Ranquet <granquet@baylibre.com>
Subject: [PATCH RFC v2 1/2] iio: introduce the OPENWIRE event type
Date: Thu, 09 Jan 2025 14:55:17 +0100	[thread overview]
Message-ID: <20250109-ad4111_openwire-v2-1-0372c2dde0ce@baylibre.com> (raw)
In-Reply-To: <20250109-ad4111_openwire-v2-0-0372c2dde0ce@baylibre.com>

Add a new event type to describe an hardware failure related to a
disconnected line on a sensor.

Signed-off-by: Guillaume Ranquet <granquet@baylibre.com>
---
 drivers/iio/industrialio-event.c | 1 +
 include/uapi/linux/iio/types.h   | 1 +
 tools/iio/iio_event_monitor.c    | 2 ++
 3 files changed, 4 insertions(+)

diff --git a/drivers/iio/industrialio-event.c b/drivers/iio/industrialio-event.c
index db06501b0e61a91e3b06345b418504803f4aefb5..a3a3e448bd9fe7f768db6a37d7ddd78402bec0c2 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_OPENWIRE] = "openwire",
 };
 
 static const char * const iio_ev_dir_text[] = {
diff --git a/include/uapi/linux/iio/types.h b/include/uapi/linux/iio/types.h
index 12886d4465e4896aedce837c2df63c78f83a5496..46a63a16a16e40f2cecd14f1db65a1a1ad7b3814 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_OPENWIRE,
 };
 
 enum iio_event_direction {
diff --git a/tools/iio/iio_event_monitor.c b/tools/iio/iio_event_monitor.c
index cccf62ea2b8f9b55a83a4960c1a60087c7b053f3..ee1bf4fe405f6c9e3619a990baa8c6347b80ca77 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_OPENWIRE] = "openwire",
 };
 
 static const char * const iio_ev_dir_text[] = {
@@ -249,6 +250,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_OPENWIRE:
 		break;
 	default:
 		return false;

-- 
2.47.1


  reply	other threads:[~2025-01-09 14:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-09 13:55 [PATCH RFC v2 0/2] iio: adc: ad7173: add ad4111 openwire detection support Guillaume Ranquet
2025-01-09 13:55 ` Guillaume Ranquet [this message]
2025-01-09 13:55 ` [PATCH RFC v2 2/2] iio: adc: ad7173: add openwire detection support for single conversions Guillaume Ranquet
2025-01-09 21:53   ` David Lechner
2025-01-10 10:50     ` Guillaume Ranquet
2025-01-12 15:23       ` Jonathan Cameron
2025-01-12 15:25   ` 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=20250109-ad4111_openwire-v2-1-0372c2dde0ce@baylibre.com \
    --to=granquet@baylibre.com \
    --cc=Michael.Hennerich@analog.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