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_allocate_trigger(); 9 10allocates a trigger structure. The key elements to then fill in within 11a driver are: 12 13trig->control_attrs 14 Any sysfs attributes needed to control parameters of the trigger 15 16trig->private_data 17 Device specific private data. 18 19trig->owner 20 Typically set to THIS_MODULE. Used to ensure correct 21 ownership of core allocated resources. 22 23trig->name 24 A unique name for the trigger. 25 26When these have been set call: 27 28iio_trigger_register(trig); 29 30to register the trigger with the core, making it available to trigger 31consumers. 32 33 34Trigger Consumers 35 36Currently triggers are only used for the filling of software ring 37buffers and as such any device supporting INDIO_RING_TRIGGERED has the 38consumer interface automatically created. 39