zio.h: introduce zio_all_block_ready() helper

It returns 1 if all active_block within a cset are ready, otherwise, it
returns 0

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
zio-trig-user.c: add data_done operations to handle output

[output]
If the user fills the buffer with many blocks, trigger user must
be able to re-arm itself after data_done to immediately output all
blocks in the buffer.

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
include/linux/zio-sysfs.h: introduce helper to retrieve std attributes

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
promote __try_push() to generic trigger helper

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Alessandro Rubini <rubinig@gnudd.com>
trigger: new trigger operation arm to handle trigger arming

This patch add a new trigger operation: arm().
The operation is useful because it allows a trigger to define its own
procedure to arm itself.

At the moment, nobody use the trigger operations data_done() and abort()
for custom tasks because the generic one works in most of the case.
Tipically there is nothing special to do if the arming procedure is
always the same.
This patch make sense of these operations because if you need a custom
arm(), probably, you also need a custom data_done() and abort().

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>