staging: comedi: pcl816: define the mode register bits
Define the bits in the register to remove the magic values. Fix pcl816_ai_cancel(). The 0x73 mask of the value read from the control register will not stop the A/D as indicated by the comment. This would just clear the DS1, POE, and EXT bits which would only disable the external trigger. Setting the control register to '0' would then stop the A/D which means the software trigger following it would not work. Just disable the trigger and clear any pending end-of-conversion. Make sure the A/D trigger is disabled at the end of the (*insn_read). Remove a couple unnecessary devpriv->dev checks. The pcl816_ai_cmd() and pcl816_ai_poll() functions are only hooked up when devpriv->dma is valid. 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>
Showing
Please register or sign in to comment