diff options
author | Vladimir Barinov <vladimir.barinov@cogentembedded.com> | 2015-08-20 21:37:39 +0200 |
---|---|---|
committer | Jonathan Cameron <jic23@kernel.org> | 2015-08-27 21:47:09 +0200 |
commit | 735ad074ffa72ccc4fdba8e54eb024df95545e7d (patch) | |
tree | 5cc52d06761fba79d2a70ce0d665b1c583bf386c /drivers/iio/industrialio-core.c | |
parent | iio: mlx90614: Implement filter configuration (diff) | |
download | linux-735ad074ffa72ccc4fdba8e54eb024df95545e7d.tar.xz linux-735ad074ffa72ccc4fdba8e54eb024df95545e7d.zip |
iio: Support triggered events
Support triggered events.
This is useful for chips that don't have their own interrupt sources.
It allows to use generic/standalone iio triggers for those drivers.
Signed-off-by: Vladimir Barinov <vladimir.barinov@cogentembedded.com>
Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'drivers/iio/industrialio-core.c')
-rw-r--r-- | drivers/iio/industrialio-core.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iio/industrialio-core.c b/drivers/iio/industrialio-core.c index b347524d1b6d..bef690ed0480 100644 --- a/drivers/iio/industrialio-core.c +++ b/drivers/iio/industrialio-core.c @@ -962,7 +962,7 @@ static void iio_device_unregister_sysfs(struct iio_dev *indio_dev) static void iio_dev_release(struct device *device) { struct iio_dev *indio_dev = dev_to_iio_dev(device); - if (indio_dev->modes & INDIO_BUFFER_TRIGGERED) + if (indio_dev->modes & (INDIO_BUFFER_TRIGGERED | INDIO_EVENT_TRIGGERED)) iio_device_unregister_trigger_consumer(indio_dev); iio_device_unregister_eventset(indio_dev); iio_device_unregister_sysfs(indio_dev); @@ -1243,7 +1243,7 @@ int iio_device_register(struct iio_dev *indio_dev) "Failed to register event set\n"); goto error_free_sysfs; } - if (indio_dev->modes & INDIO_BUFFER_TRIGGERED) + if (indio_dev->modes & (INDIO_BUFFER_TRIGGERED | INDIO_EVENT_TRIGGERED)) iio_device_register_trigger_consumer(indio_dev); if ((indio_dev->modes & INDIO_ALL_BUFFER_MODES) && |