iio: trigger: Add simple trigger_validation helper
authorMatti Vaittinen <mazziesaccount@gmail.com>
Mon, 8 May 2023 10:31:17 +0000 (13:31 +0300)
committerJonathan Cameron <Jonathan.Cameron@huawei.com>
Tue, 23 May 2023 20:20:17 +0000 (21:20 +0100)
commit517985ebc53119a2c2590d29d4056e3f17ef8375
treed2a212405bf00c28f0fff3aaf5e770f310d9710d
parent4bef3adbd4ba40ec3b81c0adf288fb44a2d0aaf2
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>
drivers/iio/industrialio-trigger.c
include/linux/iio/trigger.h