linux/drivers/staging/comedi
Ian Abbott 2f644ccfc5 staging: comedi: Make INSN_BITS behavior consistent across drivers
Most comedi hardware drivers that support the INSN_BITS instruction
ignore the base channel (specified by insn->chanspec) and assume it is
0.  The base channel is supposed to affect how the mask (in data[0]) and
bits (in data[1]) are treated.  Bit 0 applies to the base channel, bit 1
applies to base channel plus 1, etc.

For subdevices with no more than 32 channels, this patch modifies the
chanspec and data before presenting it to the hardware driver, and
modifies the data bits read back by the hardware driver (into data[1]).
This makes it appear to the hardware driver that the base channel was
set to 0.

For subdevices with more than 32 channels, the instruction is left
unmodified, as it is assumed that the hardware driver takes note of the
base channel in this case in order to provide access beyond channel 31.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-01-21 12:35:14 -08:00
..
drivers staging/comedi/icp_multi: fix sparse warning "obsolete struct initializer" 2011-01-21 12:31:16 -08:00
kcomedilib Staging: comedi: kcomedilib: fix coding style issues in kcomedilib_main.c 2010-07-08 13:15:16 -07:00
comedi_compat32.c Staging: comedi: range.c: properly mark up __user pointers 2010-05-11 11:36:03 -07:00
comedi_compat32.h Staging: comedi: remove check for HAVE_COMPAT_IOCTL 2009-12-11 12:23:01 -08:00
comedi_fops.c staging: comedi: Make INSN_BITS behavior consistent across drivers 2011-01-21 12:35:14 -08:00
comedi_fops.h Staging: comedi: fix up remaining coding style issue in proc.c 2010-05-11 11:35:58 -07:00
comedi.h Staging: comedi: Fixed more long line lengths in comedi.h 2010-05-14 13:53:19 -07:00
comedidev.h Staging: comedi: Remove COMEDI_PCI_INITCLEANUP macro 2010-06-17 13:48:12 -07:00
comedilib.h Staging: comedi: kcomedilib: make it typesafe 2010-05-11 11:36:02 -07:00
drivers.c Staging: comedi: Fix coding style issues in drivers.c 2010-12-09 16:39:06 -08:00
internal.h Staging: comedi: drivers.c sparse cleanup 2010-05-11 11:36:03 -07:00
Kconfig Staging: comedi: fixing ni_labpc to mite dependancy 2010-06-04 13:38:57 -07:00
Makefile Staging: comedi: Makefile: replace the use of <module>-objs with <module>-y 2010-10-08 07:23:52 -07:00
proc.c Staging: comedi: clean up sparse issues in proc.c 2010-05-11 11:36:03 -07:00
range.c Staging: comedi: range.c: properly mark up __user pointers 2010-05-11 11:36:03 -07:00
TODO Staging: comedi: Remove typedefs 2010-06-17 13:49:07 -07:00