staging: comedi: comedi_test: allow read-back of AO channels
commite0c6fe1294f4931af263f0386fb45943451e8b4f
authorIan Abbott <abbotti@mev.co.uk>
Tue, 27 Oct 2015 16:59:22 +0000 (27 16:59 +0000)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Oct 2015 23:58:36 +0000 (29 08:58 +0900)
tree4d2de9b91a2ab4ade95e5ea7f22dcfa7c833d66b
parent3b2468fe9854941a175d57642a05aad6f52289c7
staging: comedi: comedi_test: allow read-back of AO channels

COMEDI drivers often allow the last value written to a channel on an
analog output subdevice to be read back via the "insn_read" handler.
The "comedi_test" driver does not currently support that.  It is a bit
special because it loops back the last values written to the channel on
the analog output subdevice to be read back via corresponding channels
on the analog input subdevice.  The "insn_read" handler for the analog
input subdevice is `waveform_ai_insn_read()`.  Set that as the
"insn_read" handler for the analog output subdevice as well.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/comedi_test.c