staging: comedi: pcl816: introduce pcl816_ai_clear_eoc()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Tue, 4 Mar 2014 18:30:04 +0000 (11:30 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 7 Mar 2014 01:06:16 +0000 (17:06 -0800)
commit97880eaf9b965dd121b8fc2ef0a8fb3f4beaddbe
tree16f8df9c46ccefb90af89a5bb786fd947f2cadd3
parent079dc9fe7770ea990c7f6f2094deb9bd8f172095
staging: comedi: pcl816: introduce pcl816_ai_clear_eoc()

Introduce a helper function to clear the end-of-conversion flag.

This flag is set when an analog input conversion is finished and the
hardware generates an interrupt request. Writing any value to the
register resets the flag and re-enables the interrupt.

Move the call in pcl816_ai_cancel() so that the flag is reset after
stopping the A/D.

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>
drivers/staging/comedi/drivers/pcl816.c