]> git.karo-electronics.de Git - karo-tx-linux.git/commit
staging: comedi: ni_labpc: set up command4 register *after* command3
authorIan Abbott <abbotti@mev.co.uk>
Wed, 27 Feb 2013 12:52:46 +0000 (12:52 +0000)
committerBen Hutchings <ben@decadent.org.uk>
Wed, 6 Mar 2013 03:24:21 +0000 (03:24 +0000)
commit56546c8c2a08d511b6499c7997fd95f22da5400c
tree92bef41272e106fe118f49b1158d1205338ddb53
parent8e53d294a77b695883bf20351a60edb35b479904
staging: comedi: ni_labpc: set up command4 register *after* command3

commit 22056e2b46246d97ff0f7c6e21a77b8daa07f02c upstream.

Tuomas <tvainikk _at_ gmail _dot_ com> reported problems getting
meaningful output from a Lab-PC+ in differential mode for AI cmds, but
AI insn reads gave correct readings.  He tracked it down to two
problems, one of which is addressed by this patch.

It seems that writing to the command3 register after writing to the
command4 register in `labpc_ai_cmd()` messes up the differential
reference bit setting in the command4 register.  Set up the command4
register after the command3 register (as in `labpc_ai_rinsn()`) to avoid
the problem.

Thanks to Tuomas for suggesting the fix.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
drivers/staging/comedi/drivers/ni_labpc.c