From: Jonathan Cameron Date: Sun, 14 Mar 2021 18:14:54 +0000 (+0000) Subject: staging:iio:cdc:ad7150: Simplify event handling by only using rising direction. X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=5bfe0cac3f3bc2ced4e8c9f2c2dfe0030fe4bb4d;p=linux.git staging:iio:cdc:ad7150: Simplify event handling by only using rising direction. 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 Reviewed-by: Alexandru Ardelean Link: https://lore.kernel.org/r/20210314181511.531414-8-jic23@kernel.org --- diff --git a/drivers/staging/iio/cdc/ad7150.c b/drivers/staging/iio/cdc/ad7150.c index 539beed1a511d..34e6afe52f0ef 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);