diff options
author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2015-08-05 10:45:13 -0700 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-08-07 15:03:30 -0700 |
commit | a31b50ed1b600ed198252acccf6ec570fabcfc03 (patch) | |
tree | b07cba2874c59f8d253a978ada67e9421698ff3e /drivers/staging/comedi/drivers/me4000.c | |
parent | 2ff848c3be2d066ec0dc05f8477f97d9daa24e0d (diff) |
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>
Diffstat (limited to 'drivers/staging/comedi/drivers/me4000.c')
-rw-r--r-- | drivers/staging/comedi/drivers/me4000.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/staging/comedi/drivers/me4000.c b/drivers/staging/comedi/drivers/me4000.c index b3d871b2b6a1..3d4a9c841192 100644 --- a/drivers/staging/comedi/drivers/me4000.c +++ b/drivers/staging/comedi/drivers/me4000.c @@ -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++) |