zio-sysfs.h: introduce ZIO_ATTR_DEV_DRIVEN flags for attributes

This flags can be used by the ZIO framework to decide if read a value
directly from the hardware, or trust the value in the framework.

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
core: add write support to current_control

By writing the current-control binary attribute, the user can
configure the device.

To allow the configuration of the entire device from a control
provided by the user, this patch introduce a new structure
"zio_attr_config", it modifies the prototype of the function
t_op->config() and add a new zio device function zio_device->config()
for the device configuration.

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
tools/zio-control: a new GUI interface to read/write current_control

This interface allow you to inspect the current control of a channel.
You can change its attribute and the trigger's attributes.

At the moment, it is not possible to change the trigger type from this
interface.

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
config.c: add control flags to ignore device or trigger configuration

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
tools/zio-dump.c: print TLV information

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
TEMP core: introduce TLV support for control

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
zio.h: stop_io return integer (0 if no error)

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
helpers.c: on zio_trigger_data_done, call stop_io to invorm device

When the acquisition is over, the driver invokes zio_trigger_data_done()
to store blocks and make some clean up on trigger. But it can be useful
for the driver to clean up itself, or it must force the hardware to
interrupt the I/O.

So, with this patch, ZIO use the stop_io() operation both: when the trigger
aborts and when an acquisition is over. This should be not a problem for
the driver because in both cases the data transfer must be stopped.

More over, simmetry with the function  zio_arm_trigger(), which invoks
cset->raw_io(), the function zio_trigger_data_done() must invoke
cset->stop_io().

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
helpers.c: on abort always invoke stop_io if it exists

If a device implement the stop_io function it mean that it must do
something when an acquisition abort. So if the trigger abort the
acquisition, ZIO must invoke stop_io if it exists.

We can abort the trigger only if the device successfully stopped the
acquisition

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

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
drivers/zio-at91-adc: add support for the AT91 ADC

The driver support software fire and external trigger. At the moment it
does not support trigger from internal counter.

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
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-timer.c: nshots support for timer

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>