Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit ffed54dc authored by Ian Abbott's avatar Ian Abbott Committed by Greg Kroah-Hartman
Browse files

staging: comedi: ni_daq_700: add mux settling delay



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>
Cc: <stable@vger.kernel.org> # 3.7.x - 3.15.x
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 478da752
Loading
Loading
Loading
Loading
+2 −0
Original line number Original line Diff line number Diff line
@@ -139,6 +139,8 @@ static int daq700_ai_rinsn(struct comedi_device *dev,
	/* write channel to multiplexer */
	/* write channel to multiplexer */
	/* set mask scan bit high to disable scanning */
	/* set mask scan bit high to disable scanning */
	outb(chan | 0x80, dev->iobase + CMD_R1);
	outb(chan | 0x80, dev->iobase + CMD_R1);
	/* mux needs 2us to really settle [Fred Brooks]. */
	udelay(2);


	/* convert n samples */
	/* convert n samples */
	for (n = 0; n < insn->n; n++) {
	for (n = 0; n < insn->n; n++) {