Thread (46 messages) 46 messages, 6 authors, 2021-03-16
STALE1932d
Revisions (2)
  1. v1 current
  2. v2 [diff vs current]

[PATCH 07/24] staging:iio:cdc:ad7150: Simplify event handling by only using rising direction.

From: Jonathan Cameron <jic23@kernel.org>
Date: 2021-02-07 15:50:11
Subsystem: analog devices inc iio drivers, iio subsystem and drivers, staging - industrial io, staging subsystem, the rest · Maintainers: Nuno Sá, Michael Hennerich, Jonathan Cameron, Greg Kroah-Hartman, Linus Torvalds

From: Jonathan Cameron <Jonathan.Cameron@huawei.com>

The event line is active high and not maskable within the device.
It indicates current state directly.

The device supports separate rising and falling thresholds so rather
than trying to using each bound to detect in both directions just use
IRQF_TRIGGER_RISING.  If a user wants to detect the value falling
back below the threshold, then set the falling threshold appropriately.

Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
---
 drivers/staging/iio/cdc/ad7150.c | 1 -
 1 file changed, 1 deletion(-)
diff --git a/drivers/staging/iio/cdc/ad7150.c b/drivers/staging/iio/cdc/ad7150.c
index 539beed1a511..34e6afe52f0e 100644
--- a/drivers/staging/iio/cdc/ad7150.c
+++ b/drivers/staging/iio/cdc/ad7150.c
@@ -603,7 +603,6 @@ static int ad7150_probe(struct i2c_client *client,
 						NULL,
 						&ad7150_event_handler,
 						IRQF_TRIGGER_RISING |
-						IRQF_TRIGGER_FALLING |
 						IRQF_ONESHOT,
 						"ad7150_irq1",
 						indio_dev);
-- 
2.30.0
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help