mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
To: linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: jic23@kernel.org, Jonathan.Cameron@huawei.com,
	nuno.sa@analog.com, andy@kernel.org, dlechner@baylibre.com,
	marcelo.schmitt1@gmail.com
Subject: [RFC PATCH v1 8/9] iio: dummy: iio_simple_dummy: Update to event unit expanded interface
Date: Sun, 18 Jan 2026 15:22:07 -0300	[thread overview]
Message-ID: <40da257176192dce3b271c45b6ce7dcaa15b06af.1768759292.git.marcelo.schmitt1@gmail.com> (raw)
In-Reply-To: <cover.1768759292.git.marcelo.schmitt1@gmail.com>

The IIO events interface has been expanded with an additional parameter,
enabling drivers to handle values in real-world units for IIO event
configuration. Update to the expanded IIO event interface.

Signed-off-by: Marcelo Schmitt <marcelo.schmitt1@gmail.com>
---
 drivers/iio/dummy/iio_simple_dummy.h        | 6 ++++--
 drivers/iio/dummy/iio_simple_dummy_events.c | 2 ++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/dummy/iio_simple_dummy.h b/drivers/iio/dummy/iio_simple_dummy.h
index 8246f25dbad0..a1132781c0bc 100644
--- a/drivers/iio/dummy/iio_simple_dummy.h
+++ b/drivers/iio/dummy/iio_simple_dummy.h
@@ -66,14 +66,16 @@ int iio_simple_dummy_read_event_value(struct iio_dev *indio_dev,
 				      const struct iio_chan_spec *chan,
 				      enum iio_event_type type,
 				      enum iio_event_direction dir,
-				      enum iio_event_info info, int *val,
+				      enum iio_event_info info,
+				      enum iio_event_unit unit, int *val,
 				      int *val2);
 
 int iio_simple_dummy_write_event_value(struct iio_dev *indio_dev,
 				       const struct iio_chan_spec *chan,
 				       enum iio_event_type type,
 				       enum iio_event_direction dir,
-				       enum iio_event_info info, int val,
+				       enum iio_event_info info,
+				       enum iio_event_unit unit, int val,
 				       int val2);
 
 int iio_simple_dummy_events_register(struct iio_dev *indio_dev);
diff --git a/drivers/iio/dummy/iio_simple_dummy_events.c b/drivers/iio/dummy/iio_simple_dummy_events.c
index b51ec21b6309..9dfccc6439d4 100644
--- a/drivers/iio/dummy/iio_simple_dummy_events.c
+++ b/drivers/iio/dummy/iio_simple_dummy_events.c
@@ -120,6 +120,7 @@ int iio_simple_dummy_read_event_value(struct iio_dev *indio_dev,
 				      enum iio_event_type type,
 				      enum iio_event_direction dir,
 				      enum iio_event_info info,
+				      enum iio_event_unit unit,
 				      int *val, int *val2)
 {
 	struct iio_dummy_state *st = iio_priv(indio_dev);
@@ -144,6 +145,7 @@ int iio_simple_dummy_write_event_value(struct iio_dev *indio_dev,
 				       enum iio_event_type type,
 				       enum iio_event_direction dir,
 				       enum iio_event_info info,
+				       enum iio_event_unit unit,
 				       int val, int val2)
 {
 	struct iio_dummy_state *st = iio_priv(indio_dev);
-- 
2.51.0


  parent reply	other threads:[~2026-01-18 18:20 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-01-18 18:18 [RFC PATCH v1 0/9] iio: Expand IIO event interface for real-world unit handling Marcelo Schmitt
2026-01-18 18:18 ` [RFC PATCH v1 1/9] iio: ABI: Drop unused in_energy_input Marcelo Schmitt
2026-01-31 18:51   ` Jonathan Cameron
2026-01-18 18:20 ` [RFC PATCH v1 2/9] iio: ABI: Accurately describe in_distance_input Marcelo Schmitt
2026-01-18 19:46   ` David Lechner
2026-01-21  2:49     ` Marcelo Schmitt
2026-01-31 18:52       ` Jonathan Cameron
2026-01-18 18:20 ` [RFC PATCH v1 3/9] iio: ABI: Accurately describe in_illuminance[Y]_input Marcelo Schmitt
2026-01-18 18:20 ` [RFC PATCH v1 4/9] iio: ABI: Slight readability improve for event threshold value doc Marcelo Schmitt
2026-01-18 18:21 ` [RFC PATCH v1 5/9] iio: ABI: Update event threshold value documentation Marcelo Schmitt
2026-01-18 18:21 ` [RFC PATCH v1 6/9] iio: ABI: Adjust event threshold enable desc to unitless thresh values Marcelo Schmitt
2026-01-18 18:21 ` [RFC PATCH v1 7/9] iio: Expand IIO event interface for real-world unit handling Marcelo Schmitt
2026-01-18 20:10   ` David Lechner
2026-01-31 18:55   ` Jonathan Cameron
2026-01-18 18:22 ` Marcelo Schmitt [this message]
2026-01-18 18:22 ` [RFC PATCH v1 9/9] iio: adc: ad7091r-base: Update to event unit expanded interface Marcelo Schmitt
2026-01-18 20:33 ` [RFC PATCH v1 0/9] iio: Expand IIO event interface for real-world unit handling David Lechner
2026-01-21  2:40   ` Marcelo Schmitt
2026-01-21  9:33   ` Nuno Sá
2026-01-21 17:43     ` David Lechner
2026-01-31 18:48       ` Jonathan Cameron
2026-02-02 10:21         ` Nuno Sá

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=40da257176192dce3b271c45b6ce7dcaa15b06af.1768759292.git.marcelo.schmitt1@gmail.com \
    --to=marcelo.schmitt1@gmail.com \
    --cc=Jonathan.Cameron@huawei.com \
    --cc=andy@kernel.org \
    --cc=dlechner@baylibre.com \
    --cc=jic23@kernel.org \
    --cc=linux-iio@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nuno.sa@analog.com \
    /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

all inboxes | Powered by JetHome®