diff options
author | Ian Abbott <abbotti@mev.co.uk> | 2014-05-19 11:29:04 +0100 |
---|---|---|
committer | Jiri Slaby <jslaby@suse.cz> | 2014-06-20 17:34:05 +0200 |
commit | 089768acf22bb5a9d5a255413e5fdac0ad15c6ea (patch) | |
tree | 30eda35b5ff59be6833d2d8ec3cc58b9f6d2f615 | |
parent | e71e310b30ccd69a206412668a6335a682b4e869 (diff) | |
download | linux-stable-089768acf22bb5a9d5a255413e5fdac0ad15c6ea.tar.gz linux-stable-089768acf22bb5a9d5a255413e5fdac0ad15c6ea.tar.bz2 linux-stable-089768acf22bb5a9d5a255413e5fdac0ad15c6ea.zip |
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: Jiri Slaby <jslaby@suse.cz>
-rw-r--r-- | drivers/staging/comedi/drivers/ni_daq_700.c | 2 |
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 404f83de276d..40ca2be1d9d2 100644 --- a/drivers/staging/comedi/drivers/ni_daq_700.c +++ b/drivers/staging/comedi/drivers/ni_daq_700.c @@ -118,6 +118,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++) { |