summaryrefslogtreecommitdiff
path: root/include/linux/iio
diff options
context:
space:
mode:
authorMatti Vaittinen <mazziesaccount@gmail.com>2023-05-08 13:31:17 +0300
committerJonathan Cameron <Jonathan.Cameron@huawei.com>2023-05-23 21:20:17 +0100
commit517985ebc53119a2c2590d29d4056e3f17ef8375 (patch)
treed2a212405bf00c28f0fff3aaf5e770f310d9710d /include/linux/iio
parent4bef3adbd4ba40ec3b81c0adf288fb44a2d0aaf2 (diff)
iio: trigger: Add simple trigger_validation helper
Some triggers can only be attached to the IIO device that corresponds to the same physical device. Implement generic helper which can be used as a validate_trigger callback for such devices. Suggested-by: Jonathan Cameron <jic23@kernel.org> Signed-off-by: Matti Vaittinen <mazziesaccount@gmail.com> Link: https://lore.kernel.org/r/51cd3e3e74a6addf8d333f4a109fb9c5a11086ee.1683541225.git.mazziesaccount@gmail.com Signed-off-by: Jonathan Cameron <Jonathan.Cameron@huawei.com>
Diffstat (limited to 'include/linux/iio')
-rw-r--r--include/linux/iio/trigger.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/linux/iio/trigger.h b/include/linux/iio/trigger.h
index 51f52c5c6092..bce3b1788199 100644
--- a/include/linux/iio/trigger.h
+++ b/include/linux/iio/trigger.h
@@ -171,6 +171,7 @@ void iio_trigger_free(struct iio_trigger *trig);
*/
bool iio_trigger_using_own(struct iio_dev *indio_dev);
+int iio_validate_own_trigger(struct iio_dev *idev, struct iio_trigger *trig);
int iio_trigger_validate_own_device(struct iio_trigger *trig,
struct iio_dev *indio_dev);