summaryrefslogtreecommitdiff
path: root/drivers/staging/iio/Documentation/trigger.txt
diff options
context:
space:
mode:
authorRussell King <rmk+kernel@arm.linux.org.uk>2009-09-22 19:54:53 (GMT)
committerRussell King <rmk+kernel@arm.linux.org.uk>2009-09-22 20:01:40 (GMT)
commitae19ffbadc1b2100285a5b5b3d0a4e0a11390904 (patch)
tree3c2086ab67398a019089a47ca3f362a4bc6db74f /drivers/staging/iio/Documentation/trigger.txt
parent34e84f39a27d059a3e6ec6e8b94aafa702e6f220 (diff)
parent9173a8ef24a6b1b8031507b35b8ffe5f85a87692 (diff)
downloadlinux-fsl-qoriq-ae19ffbadc1b2100285a5b5b3d0a4e0a11390904.tar.xz
Merge branch 'master' into for-linus
Diffstat (limited to 'drivers/staging/iio/Documentation/trigger.txt')
-rw-r--r--drivers/staging/iio/Documentation/trigger.txt38
1 files changed, 38 insertions, 0 deletions
diff --git a/drivers/staging/iio/Documentation/trigger.txt b/drivers/staging/iio/Documentation/trigger.txt
new file mode 100644
index 0000000..650157f
--- /dev/null
+++ b/drivers/staging/iio/Documentation/trigger.txt
@@ -0,0 +1,38 @@
+IIO trigger drivers.
+
+Many triggers are provided by hardware that will also be registered as
+an IIO device. Whilst this can create device specific complexities
+such triggers are registered with the core in the same way as
+stand-alone triggers.
+
+struct iio_trig *trig = iio_allocate_trigger();
+
+allocates a trigger structure. The key elements to then fill in within
+a driver are:
+
+trig->control_attrs
+ Any sysfs attributes needed to control parameters of the trigger
+
+trig->private_data
+ Device specific private data.
+
+trig->owner
+ Typically set to THIS_MODULE. Used to ensure correct
+ ownership of core allocated resources.
+
+trig->name
+ A unique name for the trigger.
+
+When these have been set call:
+
+iio_trigger_register(trig);
+
+to register the trigger with the core, making it available to trigger
+consumers.
+
+
+Trigger Consumers
+
+Currently triggers are only used for the filling of software ring
+buffers and as such any device supporting INDIO_RING_TRIGGERED has the
+consumer interface automatically created.