Skip to content
Snippets Groups Projects
Commit c037dd98 authored by Federico Vaga's avatar Federico Vaga
Browse files

Documentation: explain ti->abort and ti->change_status


Signed-off-by: default avatarFederico Vaga <federico.vaga@gmail.com>
Acked-by: default avatarAlessandro Rubini <rubini@gnudd.com>
parent cd71ab0a
Branches
Tags
No related merge requests found
......@@ -79,6 +79,20 @@ trigger will push blocks to the buffer; for output it will release
the blocks. zio-core offers zio_generic_data_done() for triggers
that don't need special handling.
void (*abort)(struct zio_cset *cset);
This function is called to stop a running acquisition before the data_done
invocation. ZIO calls this function when a trigger is disabled during a
data transfer.
void (*change_status)(struct zio_ti *ti, unsigned int status);
ZIO invokes this function each time user enable or disable the trigger. The
status value is the new status of the trigger: 0 for disable and 1 for enable.
The function activates or deactivates the trigger depending on status. If the
trigger is running and the user disable it before the data_done, ZIO calls
sequentially abort and then change_status.
When the trigger fires
======================
......
......@@ -69,13 +69,18 @@ void zio_fire_trigger(struct zio_ti *ti);
* the data has been transferred for the cset, the device calls back the
* trigger. For output, data_done frees the blocks and prepares new
* blocks if possible; for input, data_done pushes material to the buffers.
* If the transfer must be interrupted before the invocation of data_done,
* the abort function must be called.
*
* Then, a trigger instance is configured either by sysfs (and this means
* the conf_set callback runs and the instance is notified) or by writing
* a whole control to the control device. In this case the config method
* is called by the write method.
*
* FIXME describe well abort and change_status
* A trigger can be enabled or disabled; each time the trigger status changes,
* ZIO invokes change_status. The trigger driver must use change_status to
* start and stop the trigger depending on status value.
*
*/
struct zio_trigger_operations {
int (*push_block)(struct zio_ti *ti,
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment