summaryrefslogtreecommitdiffstats
path: root/include/linux/iio/iio.h
diff options
context:
space:
mode:
authorMatt Ranostay2016-09-03 08:36:15 +0200
committerJonathan Cameron2016-09-03 16:31:55 +0200
commitc8cdf70890d89c07c9e890b103106d58999f0ce4 (patch)
treec96f5fa74ac061a3151b1099119a584c55a18a85 /include/linux/iio/iio.h
parentiio: sx9500: add final devicetree support (diff)
downloadkernel-qcow2-linux-c8cdf70890d89c07c9e890b103106d58999f0ce4.tar.gz
kernel-qcow2-linux-c8cdf70890d89c07c9e890b103106d58999f0ce4.tar.xz
kernel-qcow2-linux-c8cdf70890d89c07c9e890b103106d58999f0ce4.zip
iio: trigger: allow immutable triggers to be assigned
There are times when an assigned trigger to a device shouldn't ever change after intialization. Examples of this being used is when an provider device has a trigger that is assigned to an ADC, which uses it populate data into a callback buffer. Signed-off-by: Matt Ranostay <matt@ranostay.consulting> Signed-off-by: Jonathan Cameron <jic23@kernel.org>
Diffstat (limited to 'include/linux/iio/iio.h')
-rw-r--r--include/linux/iio/iio.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/iio/iio.h b/include/linux/iio/iio.h
index 854e2dad1e0d..786952cd509f 100644
--- a/include/linux/iio/iio.h
+++ b/include/linux/iio/iio.h
@@ -483,6 +483,7 @@ struct iio_buffer_setup_ops {
* @scan_timestamp: [INTERN] set if any buffers have requested timestamp
* @scan_index_timestamp:[INTERN] cache of the index to the timestamp
* @trig: [INTERN] current device trigger (buffer modes)
+ * @trig_readonly [INTERN] mark the current trigger immutable
* @pollfunc: [DRIVER] function run on trigger being received
* @pollfunc_event: [DRIVER] function run on events trigger being received
* @channels: [DRIVER] channel specification structure table
@@ -523,6 +524,7 @@ struct iio_dev {
bool scan_timestamp;
unsigned scan_index_timestamp;
struct iio_trigger *trig;
+ bool trig_readonly;
struct iio_poll_func *pollfunc;
struct iio_poll_func *pollfunc_event;