]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commiteb3266f4b059af877738a2c0fd60b07fee3b2a73
tree9a07ec51a5dda3980cc7b9953ea479c34f6f2d9f
parentcc6d30c873b9b43b64934d024fe0012446e85f48
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