staging: comedi: cb_pcimdas: support analog input programmable ranges
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 25 Feb 2015 23:28:39 +0000 (16:28 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Mar 2015 02:56:30 +0000 (18:56 -0800)
commitc7549d770a27cbdb521ea9ed646c1fc242d77a0a
tree65acd027f0c0c21e8afe6c528c6b8ff974e707a9
parent532a411e8b54418c2aed9e20f02b359002bb7e44
staging: comedi: cb_pcimdas: support analog input programmable ranges

The hardware uses a switch on the board to select if the analog inputs
are bipolar or uinipolar. The gain is programmable to allow the following
input ranges:

  Gain  Bipolar   Unipolar
    0   +/-10V    0 to 10V
    1   +/-5V     0 to 5V
    2   +/-2.5V   0 to 2.5V
    3   +/-1.25V  0 to 1.25V

Add the necessary code to the driver to allow the user to select the
desired range.

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/cb_pcimdas.c