Skip to content
Commit 7ecc5370 authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman
Browse files

staging: comedi: pcmad: properly handle analog input encoding configuration



The comedi_config utility is used to attach to this board. One of the
configuration options passed by the user sets the analog input encoding
for straight binary or two's complement data. The hardware produces
straight binary data when jumpered for 5V unipolar inputs and two's
complement data when jumpered for +-10V bipolar inputs.

Use the configuration option to correctly set the comedi_subdevice
range_table.

We can then use a helper function to determine what the range is when
reading the analog inputs. This allows removing the 'twos_comp' variable
from the private data (which was actually never used).

Since the private data is now empty, remove it completely.

Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 6092e942
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment