linux-xiaomi-chiron/drivers/staging
Ian Abbott be8e89087e staging: comedi: cb_pcidas64: fix incorrect AI range code handling
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>
Cc: <stable@vger.kernel.org> # 3.18.x
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-01-25 19:59:09 +08:00
..
android staging: android: remove space after casts 2015-01-17 16:20:20 -08:00
board staging:board: remove unnecessary function 2015-01-17 16:17:11 -08:00
clocking-wizard staging: clocking-wizard: Handle invalid clk in notifier 2015-01-17 16:06:20 -08:00
comedi staging: comedi: cb_pcidas64: fix incorrect AI range code handling 2015-01-25 19:59:09 +08:00
cptm1217 cptm1217: check if interrupts are masked at probe 2015-01-17 16:05:02 -08:00
dgap staging: dgap: use gotos for handling error in dgap_remap() 2015-01-17 16:10:48 -08:00
dgnc staging: dgnc: implement proper error handling in dgnc_start() 2015-01-17 15:04:12 -08:00
emxx_udc Staging patches for 3.19-rc1 2014-12-15 18:06:13 -08:00
fbtft staging: fbtft: remove ARCH_BCM2708 optimization 2015-01-21 09:17:49 +08:00
ft1000 Staging: ft1000-pcmcia: fix else close brace style 2015-01-17 15:22:31 -08:00
fwserial staging: fwserial: remove multiple blank lines 2014-11-26 13:53:25 -08:00
gdm72xx More ACPI and power management updates for 3.19-rc1 2014-12-18 20:28:33 -08:00
gdm724x staging: gdm724x: fix line limit coding style issue in gdm_lte.c 2015-01-17 14:57:43 -08:00
goldfish staging: goldfish: avoid multiple assignments 2014-09-06 21:54:57 -07:00
gs_fpgaboot staging: gs_fpgaboot: io.c: Remove unused function 2015-01-17 15:19:52 -08:00
iio First round of IIO new drivers, cleanups and functionality for the 3.20 cycle take 2 2015-01-21 10:13:37 +08:00
line6 staging: line6: fix midibuf.c coding style issue 2014-09-23 23:41:25 -07:00
lustre staging: lustre: Add blank lines after declarations 2015-01-17 16:02:27 -08:00
media staging: davinci_vpfe: fix space prohibited before semicolon warning 2015-01-17 16:22:15 -08:00
mt29f_spinand staging: mt29f_spinand: Fix typo in Kconfig 2015-01-17 16:22:15 -08:00
netlogic Staging: NetLogic: Coding style correction 2015-01-17 15:17:10 -08:00
nvec staging: nvec: specify a platform-device base id 2015-01-21 10:31:09 +08:00
octeon Staging: octeon: Fixed a typo 2015-01-17 15:00:23 -08:00
octeon-usb Staging: octeon-usb: Fixed a typo 2015-01-17 15:00:23 -08:00
olpc_dcon staging: olpc_dcon: fix sparse symbol not declared warning 2015-01-17 15:17:10 -08:00
ozwpan Staging patches for 3.19-rc1 2014-12-15 18:06:13 -08:00
panel staging: panel: Remove magic numbers in LCD commands 2015-01-12 06:39:33 -08:00
rtl8188eu staging: rtl8188eu: core: rtw_mlme_ext.c: Remove unused function 2015-01-17 14:10:03 -08:00
rtl8192e staging: rtl8192e: Fix duplicated conditional branch 2015-01-17 14:21:59 -08:00
rtl8192u Staging: rtl8192u: Remove check of ieee in rtl819x_BAProc.c 2015-01-17 14:21:59 -08:00
rtl8712 staging: rtl8712: remove spaces before commas 2015-01-17 14:20:25 -08:00
rtl8723au staging: rtl8723au: fix sparse warning 2015-01-17 13:59:33 -08:00
rts5208 staging: rts5208/ms.c: Code style fix (space before comma) 2015-01-17 16:07:20 -08:00
skein staging: skein: Fixing single statement macro checkpatch warning 2015-01-17 15:05:52 -08:00
slicoss Staging: slicoss: Fix long line issues in slicoss.c 2014-12-02 16:54:43 -08:00
speakup staging: speakup: Combine the consecutive string 2015-01-17 16:14:16 -08:00
ste_rmi4 Staging: ste_rmi4: add new line after declarations 2014-09-23 13:44:11 -07:00
unisys staging: virtpci: Remove no-op suspend/resume functions 2015-01-17 16:16:00 -08:00
vme Staging: vme: devices: Use kasprintf 2014-10-27 10:33:05 +08:00
vt6655 Merge 3.19-rc5 into staging-next 2015-01-19 10:59:48 +08:00
vt6656 Staging: vt6656: Checkpatch fix: else after break or return 2015-01-12 19:48:25 -08:00
wlan-ng staging: wlan-ng: Fix comment in prism2sta.c 2015-01-17 16:10:48 -08:00
xgifb staging: xgifb: remove unnecessary check 2015-01-17 16:15:59 -08:00
Kconfig staging: fbtft: core support 2015-01-17 16:44:41 -08:00
Makefile staging: fbtft: core support 2015-01-17 16:44:41 -08:00
staging.c