summaryrefslogtreecommitdiff
path: root/drivers/media/rc
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2015-02-27 18:52:08 +0000
committerBen Hutchings <ben@decadent.org.uk>2015-03-06 00:39:19 +0000
commit1c41da27b53bca2b97b24653b55dd690e3bfd8bc (patch)
tree4ea589f8558a7b2449e9d1367da3cd88602851b3 /drivers/media/rc
parent01c4de7a34c024d06309b5607c0374ae9855d0d3 (diff)
downloadlwn-1c41da27b53bca2b97b24653b55dd690e3bfd8bc.tar.gz
lwn-1c41da27b53bca2b97b24653b55dd690e3bfd8bc.zip
staging: comedi: cb_pcidas64: fix incorrect AI range code handling
commit be8e89087ec2d2c8a1ad1e3db64bf4efdfc3c298 upstream. The hardware range code values and list of valid ranges for the AI subdevice is incorrect for several supported boards. The hardware range code values for all boards except PCI-DAS4020/12 is determined by calling `ai_range_bits_6xxx()` based on the maximum voltage of the range and whether it is bipolar or unipolar, however it only returns the correct hardware range code for the PCI-DAS60xx boards. For PCI-DAS6402/16 (and /12) it returns the wrong code for the unipolar ranges. For PCI-DAS64/Mx/16 it returns the wrong code for all the ranges and the comedi range table is incorrect. Change `ai_range_bits_6xxx()` to use a look-up table pointed to by new member `ai_range_codes` of `struct pcidas64_board` to map the comedi range table indices to the hardware range codes. Use a new comedi range table for the PCI-DAS64/Mx/16 boards (and the commented out variants). Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Diffstat (limited to 'drivers/media/rc')
0 files changed, 0 insertions, 0 deletions