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 0/2] iio: adc: ad7173: add ad4111 openwire detection support
Date: Thu, 09 Jan 2025 14:55:16 +0100 [thread overview]
Message-ID: <20250109-ad4111_openwire-v2-0-0372c2dde0ce@baylibre.com> (raw)
Hi.
This patch adds the openwire detection support for the ad4111 chip.
The openwire detection is done in software and relies on comparing the
results of two conversions on different channels.
Following the discussion in the RFC V1, I'm taking the easy route of
adding a new event type called IIO_EV_TYPE_OPENWIRE to signal the
condition to the userland.
I have chosen this option rather than the generic TRACE_EVENT() solution
exposed by Jonathan because this change is more contained and only
impacts the iio subsystem.
The TRACE_EVENT() option, although more generic, will require a lot of
discussion between involved parties and is probably easier to tackle in
person than through the mailing list?
The openwire detection on ad4111 is triggered automatically when a
single conversion is requested.
Due to the way openwire detection works on ad4111, implementing openwire
detection for continuous conversion mode is more complicated.
Thx,
Guillaume.
Signed-off-by: Guillaume Ranquet <granquet@baylibre.com>
---
Changes in v2:
- Introduce IIO_EV_TYPE_OPENWIRE instead of misusing the IIO_EV_THRESH
event.
- Link to v1: https://lore.kernel.org/r/20241115-ad4111_openwire-v1-1-db97ac8bf250@baylibre.com
---
Guillaume Ranquet (2):
iio: introduce the OPENWIRE event type
iio: adc: ad7173: add openwire detection support for single conversions
drivers/iio/adc/ad7173.c | 164 +++++++++++++++++++++++++++++++++++++++
drivers/iio/industrialio-event.c | 1 +
include/uapi/linux/iio/types.h | 1 +
tools/iio/iio_event_monitor.c | 2 +
4 files changed, 168 insertions(+)
---
base-commit: c849f534b9ea4688304f80f4571af75931dda7c1
change-id: 20241115-ad4111_openwire-e55deba8297f
prerequisite-message-id: <20241115-ad411x_calibration-v1-1-5f820dfb5c80@baylibre.com>
prerequisite-patch-id: 26241903b8fee8c4243e73d11fb2872cd9f52a15
Best regards,
--
Guillaume Ranquet <granquet@baylibre.com>
next 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 Guillaume Ranquet [this message]
2025-01-09 13:55 ` [PATCH RFC v2 1/2] iio: introduce the OPENWIRE event type Guillaume Ranquet
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-0-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