lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9c69a99f02428b6a3ff15adb1613c0da9d377691.1768759292.git.marcelo.schmitt1@gmail.com>
Date: Sun, 18 Jan 2026 15:22:39 -0300
From: Marcelo Schmitt <marcelo.schmitt1@...il.com>
To: linux-iio@...r.kernel.org, linux-kernel@...r.kernel.org
Cc: jic23@...nel.org, Jonathan.Cameron@...wei.com, nuno.sa@...log.com,
	andy@...nel.org, dlechner@...libre.com, marcelo.schmitt1@...il.com
Subject: [RFC PATCH v1 9/9] iio: adc: ad7091r-base: Update to event unit
 expanded interface

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@...il.com>
---
 drivers/iio/adc/ad7091r-base.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/drivers/iio/adc/ad7091r-base.c b/drivers/iio/adc/ad7091r-base.c
index 647a7852dd8d..b3c6f6e5053d 100644
--- a/drivers/iio/adc/ad7091r-base.c
+++ b/drivers/iio/adc/ad7091r-base.c
@@ -27,6 +27,7 @@ const struct iio_event_spec ad7091r_events[] = {
 	{
 		.type = IIO_EV_TYPE_THRESH,
 		.dir = IIO_EV_DIR_FALLING,
+		.unit = IIO_EV_UNIT_RAW,
 		.mask_separate = BIT(IIO_EV_INFO_VALUE) |
 				 BIT(IIO_EV_INFO_ENABLE),
 	},
@@ -183,7 +184,8 @@ static int ad7091r_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, int *val2)
+				    enum iio_event_info info,
+				    enum iio_event_unit unit, int *val, int *val2)
 {
 	struct ad7091r_state *st = iio_priv(indio_dev);
 	int ret;
@@ -224,7 +226,8 @@ static int ad7091r_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, int val2)
+				     enum iio_event_info info,
+				     enum iio_event_unit unit, int val, int val2)
 {
 	struct ad7091r_state *st = iio_priv(indio_dev);
 
-- 
2.51.0


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ