1IIO trigger drivers. 2 3Many triggers are provided by hardware that will also be registered as 4an IIO device. Whilst this can create device specific complexities 5such triggers are registered with the core in the same way as 6stand-alone triggers. 7 8struct iio_trig *trig = iio_trigger_alloc("<trigger format string>", ...); 9 10allocates a trigger structure. The key elements to then fill in within 11a driver are: 12 13trig->set_trigger_state: 14 Function that enables / disables the underlying source of the trigger. 15 16There is also a 17trig->alloc_list which is useful for drivers that allocate multiple 18triggers to keep track of what they have created. 19 20When these have been set call: 21 22iio_trigger_register(trig); 23 24to register the trigger with the core, making it available to trigger 25consumers. 26 27Trigger Consumers 28 29Currently triggers are only used for the filling of software 30buffers and as such any device supporting INDIO_BUFFER_TRIGGERED has the 31consumer interface automatically created. 32