staging: comedi: dt282x: automatically handle D/A data format
The DT2821 series board have jumpers that set the output range for the two Analog Output channels. The range_table for the Analog Output subdevice provides all possible ranges to the user. When a unipolar range is selected the board expects the data to be in a straight binary format. When a bipolar range is select the data should be in two's complement format. Currently, the user passes some configuration options when attaching to the driver to select the data format for each channel. If the user does not pass the config options, the data format is assumed to be straight binary. The Analog Output subdevice now has a range_table that provides the user will all possible ranges. Use the range information to determine if the data values need to be munged into two's complememnt values and deprecate the config options. 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>
Showing
Please register or sign in to comment