~ubuntu-branches/ubuntu/trusty/linux-linaro-omap/trusty

« back to all changes in this revision

Viewing changes to drivers/staging/iio/Documentation/trigger.txt

  • Committer: Package Import Robot
  • Author(s): John Rigby, John Rigby
  • Date: 2011-09-26 10:44:23 UTC
  • Revision ID: package-import@ubuntu.com-20110926104423-57i0gl3v99b3lkfg
Tags: 3.0.0-1007.9
[ John Rigby ]

Enable crypto modules and remove crypto-modules from
exclude-module files
LP: #826021

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
such triggers are registered with the core in the same way as
6
6
stand-alone triggers.
7
7
 
8
 
struct iio_trig *trig = iio_allocate_trigger();
 
8
struct iio_trig *trig = iio_allocate_trigger("<trigger format string>", ...);
9
9
 
10
10
allocates a trigger structure.  The key elements to then fill in within
11
11
a driver are:
12
12
 
13
 
trig->control_attrs
14
 
        Any sysfs attributes needed to control parameters of the trigger
15
 
 
16
13
trig->private_data
17
14
        Device specific private data.
18
15
 
20
17
        Typically set to THIS_MODULE. Used to ensure correct
21
18
        ownership of core allocated resources.
22
19
 
23
 
trig->name
24
 
        A unique name for the trigger.
 
20
trig->set_trigger_state:
 
21
        Function that enables / disables the underlying source of the trigger.
 
22
 
 
23
There is also a
 
24
trig->alloc_list which is useful for drivers that allocate multiple
 
25
triggers to keep track of what they have created.
25
26
 
26
27
When these have been set call:
27
28
 
30
31
to register the trigger with the core, making it available to trigger
31
32
consumers.
32
33
 
33
 
 
34
34
Trigger Consumers
35
35
 
36
 
Currently triggers are only used for the filling of software ring
 
36
Currently triggers are only used for the filling of software
37
37
buffers and as such any device supporting INDIO_RING_TRIGGERED has the
38
38
consumer interface automatically created.