staging: comedi: mite: enable continuous regeneration of finite samples
authorSpencer E. Olson <olsonse@umich.edu>
Wed, 27 Jan 2016 21:28:24 +0000 (14:28 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Feb 2016 02:38:08 +0000 (18:38 -0800)
commit5b293beb2ef0c45cd3c0e00ce67930b5d3471c13
treefd960d0b02fe80712d8370735856f8cba784d923
parentf08a28e65cbdf80b4b4da7e423c45ee7c3ef35ac
staging: comedi: mite: enable continuous regeneration of finite samples

This change enables the mite DMA controller to only transfer the amount of
data needed by a command.  By default, the old behavior of transferring the
entire comedi DMA data buffer is still in effect.  These changes allow a
command to only transmit a limited portion of that data buffer as needed.

This patch begins to reinterprets stop_arg when stop_src == TRIG_NONE to
allow the user to specify the length of the buffer that should be repeated.
The intent is to allow a user to have a specific buffer repeated as-is
indefinitely.  The contents of the DMA buffer can be left static or changed
by the user via mmap access to the DMA buffer.  If the contents are changed
by the user, additional munging is not performed by the driver and only a
single call to comedi_mark_buffer_written should be done.

Signed-off-by: Spencer E. Olson <olsonse@umich.edu>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/mite.c
drivers/staging/comedi/drivers/mite.h