staging: comedi: pcl818: introduce pcl818_ai_get_sample()
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 17 Feb 2014 21:27:16 +0000 (14:27 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Tue, 18 Feb 2014 19:55:31 +0000 (11:55 -0800)
commit8fc9f652abd71fd53e17c3b2430e702e5a55fae2
tree1be68890ee24ce98974a69ea308c4683439bd9be
parent66581ca576717229d65003f0870d6dd14e1fe52e
staging: comedi: pcl818: introduce pcl818_ai_get_sample()

Introduce a helper function to read the 12-bit analog input data
sample and optionally return the channel that the sample was for.
The channel is only used in the interrupt routine to check for
dropped samples.

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/pcl818.c