staging: comedi: ii_pci20kc.c: cleanup the dio subdevice
For asethetics, redefine the register map for the carrier board. The 'PCI*' names lead one to think this is a PCI board not a legacy ISA board. Remove the #if 0'd out pci20xxx_{do,di}() functions. They are not needed. Rename, and fix, the pci20xxx_dio_config() function. The control and direction registers are not readable. Use the new register map defines instead of the crazy bit shifts. Rename, and fix, the pci20xxx_dio_insn_config() function. This function should treat data[0] as the 'instruction' to handle not just use it to determine if the port is an input or output. Rename, and tix, the pci20xxx_dio_insn_bits() function. The 'state' only needs to be updated if the 'mask' indicates. For aesthetics, abosrb the pci20xxx_dio_init() into the (*attach) function. Fix the carrier board id detect in the (*attach). There are two carrier board types, one with 32 dio channels and one without. Use this info when setting up the dio subdevice. Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Showing
This diff is collapsed.
Please register or sign in to comment