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>
core: add change_flags operation to zio_{device|cset|chan}

Add to zio_device, zio_cset and zio_channel a new operation: change_flags.
The core uses this function to signal to the driver that some flags are changed.

This patch also improve the comment on the __zobj_enable function

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
zio-ad788x.c: re-organize code (and fix memory leakage)

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
zio-ad788x.c: split tx building in a new function

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
ad788x: add support to AD7476 1-chan ADC

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

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

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>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
config.c: check if mask are empty before find attrs

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Alessandro Rubini <rubini@gnudd.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>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
UNTESTED zio-trigger.h: on output configure device before trigger fire

Signed-off-by: Federico Vaga <federico.vaga@gmail.com>
Acked-by: Alessandro Rubini <rubini@gnudd.com>
config.c: do not se seq_num if 0

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