]> git.openfabrics.org - ~emulex/infiniband.git/commit
staging: comedi: dt282x: cleanup analog output range table
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Fri, 20 Jun 2014 20:12:56 +0000 (13:12 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 27 Jun 2014 00:08:20 +0000 (20:08 -0400)
commitfc00fbc990871a17e0e0f31acc0876f83165cf53
tree00f63dd9523caef12b92379f99d12fe042da886a
parentd5aa6b7c31d8f9667e743a8bb2a6677caf78cd31
staging: comedi: dt282x: cleanup analog output range table

The DT2821 series boards do not have programmable analog output ranges.
The range is set, per-channel, with jumpers on the board.

Currently the user has to pass some configuration options when attaching
to the driver in order to set the range for each channel. If they do not
pass the range options they will default to 0. If they pass an invalid
range option they will also default to 0. The 0 range option is bipolar
10V. If the user passes a range option that does not match the hardware
setting it doesn't cause any problems in the driver it just causes the
user space comedilib library to incorrectly convert the hardware values
to physical values.

Make the attach a bit simpler by deprecating these options and providing
a range table with all the valid ranges for the analog outputs. The user
can then select the correct range when they use the comedilib functions.

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