diff options
author | Jonathan Cameron <jic23@cam.ac.uk> | 2009-08-18 18:06:32 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2009-09-15 12:02:25 -0700 |
commit | c57f1ba7326100fd90c35259a588a8484bf569b4 (patch) | |
tree | 57bf331086ac7dbb916e79753702bafeaa0713f6 /drivers/staging/iio/Documentation/trigger.txt | |
parent | 930bae8667c100d727360c0fa0df0378af9097ea (diff) |
Staging: IIO: Initial documentation
This needs considerably more work, all comments / suggestions
welcomed.
Signed-off-by: Jonathan Cameron <jic23@cam.ac.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/staging/iio/Documentation/trigger.txt')
-rw-r--r-- | drivers/staging/iio/Documentation/trigger.txt | 38 |
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 000000000000..650157f5c9de --- /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. |