diff options
author | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2015-08-05 17:04:01 -0300 |
---|---|---|
committer | André Fabian Silva Delgado <emulatorman@parabola.nu> | 2015-08-05 17:04:01 -0300 |
commit | 57f0f512b273f60d52568b8c6b77e17f5636edc0 (patch) | |
tree | 5e910f0e82173f4ef4f51111366a3f1299037a7b /drivers/staging/iio/Documentation/trigger.txt |
Initial import
Diffstat (limited to 'drivers/staging/iio/Documentation/trigger.txt')
-rw-r--r-- | drivers/staging/iio/Documentation/trigger.txt | 35 |
1 files changed, 35 insertions, 0 deletions
diff --git a/drivers/staging/iio/Documentation/trigger.txt b/drivers/staging/iio/Documentation/trigger.txt new file mode 100644 index 000000000..7c0e505e4 --- /dev/null +++ b/drivers/staging/iio/Documentation/trigger.txt @@ -0,0 +1,35 @@ +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_trigger_alloc("<trigger format string>", ...); + +allocates a trigger structure. The key elements to then fill in within +a driver are: + +trig->owner + Typically set to THIS_MODULE. Used to ensure correct + ownership of core allocated resources. + +trig->set_trigger_state: + Function that enables / disables the underlying source of the trigger. + +There is also a +trig->alloc_list which is useful for drivers that allocate multiple +triggers to keep track of what they have created. + +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 +buffers and as such any device supporting INDIO_BUFFER_TRIGGERED has the +consumer interface automatically created. |