Skip to content

Commit

Permalink
staging: comedi: ni_daq_700: add mux settling delay
Browse files Browse the repository at this point in the history
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: Ian Abbott <abbotti@mev.co.uk>
Reported-by: Fred Brooks <nsaspook@nsaspook.com>
Cc: <stable@vger.kernel.org> # 3.7.x - 3.15.x
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Ian Abbott authored and Greg Kroah-Hartman committed May 23, 2014
1 parent 478da75 commit ffed54d
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/staging/comedi/drivers/ni_daq_700.c
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,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++) {
Expand Down

0 comments on commit ffed54d

Please sign in to comment.