staging: comedi: das6402: rewrite broken driver
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 14 Mar 2014 19:24:26 +0000 (12:24 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 17 Mar 2014 21:20:10 +0000 (14:20 -0700)
commit79e5e6addbb18bf56075f0ff552094a28636dd03
tree9a07ec51a5dda3980cc7b9953ea479c34f6f2d9f
parent2925cc8637f47efe0ecba3ca4519983fb249ddde
staging: comedi: das6402: rewrite broken driver

This driver is _really_ broken.

It initializes an analog input subdevice that only has a (*cancel)
function. It also does a request_irq() to hookup an interrupt handler
using it->options[0] as the IRQ. This option is actually the base
address of the I/O region used by the board. If the interrupt handler
actually did get hooked up, the rest of the code assumes that IRQ 10
is being used.

Rewrite the driver to properly support the hardware.

The DAS6402-12/16 boards have 64 single-ended / 32 differential analog
inputs, 2 analog outputs, 8 digital inputs, and 8 digital outputs. Add
proper support for these subdevices.

Stub in the analog input async command support.

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>
drivers/staging/comedi/drivers/das6402.c