Commit a31b50ed authored by H Hartley Sweeten's avatar H Hartley Sweeten Committed by Greg Kroah-Hartman

staging: comedi: me4000: clear the ME4000_AI_CTRL_REG in me4000_reset()

Reset the analog input control register after ensuring that any active
conversions have been stopped. This mimics what the ai subdevice (*cancel)
does.
Signed-off-by: default avatarH Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: default avatarIan Abbott <abbotti@mev.co.uk>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 2ff848c3
......@@ -414,6 +414,9 @@ static void me4000_reset(struct comedi_device *dev)
outl(ME4000_AI_CTRL_IMMEDIATE_STOP | ME4000_AI_CTRL_STOP,
dev->iobase + ME4000_AI_CTRL_REG);
/* Clear the analog input control register */
outl(0x0, dev->iobase + ME4000_AI_CTRL_REG);
/* Set both stop bits in the analog output control register */
val = ME4000_AO_CTRL_IMMEDIATE_STOP | ME4000_AO_CTRL_STOP;
for (chan = 0; chan < 4; chan++)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment