aboutsummaryrefslogtreecommitdiff
path: root/drivers
diff options
context:
space:
mode:
authorIan Abbott <abbotti@mev.co.uk>2014-05-19 11:29:04 +0100
committerShow Liu <show.liu@linaro.org>2014-06-18 12:05:27 +0800
commitc34c739700f311d2ff1fb765e2407a69f91abda4 (patch)
tree50493b99745d517785daf1b0412bde29e2a899c1 /drivers
parent2e5d43de98c5a3d92aa038ae7ac23ab50d0de244 (diff)
downloadlinaro-lsk-c34c739700f311d2ff1fb765e2407a69f91abda4.tar.gz
staging: comedi: ni_daq_700: add mux settling delay
commit ffed54dced86723f352323f15789d9ad6bee25e1 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: Ian Abbott <abbotti@mev.co.uk> Reported-by: Fred Brooks <nsaspook@nsaspook.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/staging/comedi/drivers/ni_daq_700.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/staging/comedi/drivers/ni_daq_700.c b/drivers/staging/comedi/drivers/ni_daq_700.c
index e4cdca34915..6417af0bdaa 100644
--- a/drivers/staging/comedi/drivers/ni_daq_700.c
+++ b/drivers/staging/comedi/drivers/ni_daq_700.c
@@ -122,6 +122,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++) {