diff options
author | Michael Hennerich <michael.hennerich@analog.com> | 2011-06-27 13:07:09 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2011-06-28 14:39:33 -0700 |
commit | 43a4360ea8f075540cb7c1efc8d643b4261eb901 (patch) | |
tree | e380d8c5563b32f13b7c7b06a224c32998a199d3 /drivers/staging/iio/iio.h | |
parent | 03e1672a70be991a9e84d67b2d2143313938e1a8 (diff) |
iio: trigger: Add filter callback
Allow devices to reject triggers and vice versa.
Changes since V1:
Added kernel-doc
Moved callback into iio_info
Changed function naming
Revised return value passing
Add forward declaration to avoid warnings
Signed-off-by: Michael Hennerich <michael.hennerich@analog.com>
Acked-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/iio.h')
-rw-r--r-- | drivers/staging/iio/iio.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/staging/iio/iio.h b/drivers/staging/iio/iio.h index 78a0927c9fdf..6e51baaaa754 100644 --- a/drivers/staging/iio/iio.h +++ b/drivers/staging/iio/iio.h @@ -204,6 +204,8 @@ static inline s64 iio_get_time_ns(void) #define IIO_VAL_INT_PLUS_MICRO 2 #define IIO_VAL_INT_PLUS_NANO 3 +struct iio_trigger; /* forward declaration */ + /** * struct iio_info - constant information about device * @driver_module: module structure used to ensure correct @@ -224,6 +226,8 @@ static inline s64 iio_get_time_ns(void) * is event dependant. event_code specifies which event. * @write_event_value: write the value associate with the event. * Meaning is event dependent. + * @validate_trigger: function to validate the trigger when the + * current trigger gets changed. **/ struct iio_info { struct module *driver_module; @@ -256,6 +260,9 @@ struct iio_info { int (*write_event_value)(struct iio_dev *indio_dev, int event_code, int val); + int (*validate_trigger)(struct iio_dev *indio_dev, + struct iio_trigger *trig); + }; /** |