Commit f3c0ca9b authored by Ian Abbott's avatar Ian Abbott Committed by Greg Kroah-Hartman

staging: comedi: ni_daq_700: add mux settling delay

commit ffed54dc upstream.

I got a patch from the original author, Fred Brooks, to add a small
settling delay after setting the AI channel multiplexor.  The lack of
delay resulted in unstable or scrambled data on faster processors.
Signed-off-by: default avatarIan Abbott <abbotti@mev.co.uk>
Reported-by: default avatarFred Brooks <nsaspook@nsaspook.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent e7eb1ab9
......@@ -127,6 +127,8 @@ static int daq700_ai_rinsn(struct comedi_device *dev,
/* write channel to multiplexer */
/* set mask scan bit high to disable scanning */
outb(chan | 0x80, dev->iobase + CMD_R1);
/* mux needs 2us to really settle [Fred Brooks]. */
udelay(2);
/* convert n samples */
for (n = 0; n < insn->n; n++) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment