diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2013-06-12 16:15:27 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-06-17 14:33:42 -0700 |
commit | da6578abd7c7535e59cae5eb0c54f5cd13902a6d (patch) | |
tree | 386c529ee0063cc12184258eeaadce46b76d04f0 /tools/perf/scripts/python/syscall-counts.py | |
parent | 0e771e49fc2174054bbb4927f9afe8db4e16ae0b (diff) |
staging: comedi: addi_apci_3xxx: refactor the ttl digital i/o support
Currently, the subdevice functions used to configure and read/write the
ttl digital i/o ports is way over to complicated. The (*insn_config)
function also abuses the comedi API by overriding the instruction
command passed in data[0].
Fix the ttl digital i/o support to work like the comedi core expects.
The (*insn_config) function supports the three instructions common for
COMEDI_SUBD_DIO subdevices:
INSN_CONFIG_DIO_INPUT - configure the specified channel as input
INSN_CONFIG_DIO_OUTPUT - configure the specified channel as output
INSN_CONFIG_DIO_QUERY - returns the status of the specified channel
Port 0 (channels 0-7) is always input
Port 1 (channels 8-15) is always output
Port 2 (channels 9-23) are programmable i/o (all channels are input or output)
The (*insn_bits) function allows writing to the output channels and returns
the state of all channels.
The (*insn_read) and (*insn_write) functions are not required. The comedi
core will emulate them using the (*insn_bits) function.
Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools/perf/scripts/python/syscall-counts.py')
0 files changed, 0 insertions, 0 deletions