]> git.baikalelectronics.ru Git - kernel.git/commit
staging: comedi: me_daq: allow differential analog inputs
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Wed, 7 Oct 2015 00:23:43 +0000 (17:23 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 13 Oct 2015 05:56:26 +0000 (22:56 -0700)
commitaef97ade09177c5e9e0a1cd467269a95b80609bb
treee4bfa77cb6e202fd2fa2cec28543cab189725450
parentbd3164b370c6e2391b0ae8173ed71f3fca05c302
staging: comedi: me_daq: allow differential analog inputs

The ai (*insn_read) allows differential analog inputs but the subdevice
initialization is missing the SDF_DIFF subdev_flag to allow the user to
select this mode. Fix the subdevice init.

According to the manual, differential operation only works with the
first 8 channels and bipolar ranges. Add a check to the (*insn_read) to
ensure this.

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