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: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
H Hartley Sweeten 2015-08-05 10:45:13 -07:00 коммит произвёл Greg Kroah-Hartman
Родитель 2ff848c3be
Коммит a31b50ed1b
1 изменённых файлов: 3 добавлений и 0 удалений

Просмотреть файл

@ -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++)