staging: comedi: das1800: clarify step 4 of the ai (*do_cmdtest)
This step of the (*do_cmdtest) fixes the timing arguments when the cmd->convert_src is TRIG_TIMER. The code is compact but it's a bit hard to understand the "burst mode" vs. "non burst mode" (i.e. paced) timing. Clarify the fixup by splitting it into separate functions to check the arguments based on if the command is doing 'paced' or 'burst' timing. Add some comments to clarify the fixups. This also fixes a minor issue with the 'burst' timing. When the cmd->scan_begin_src is also TRIG_TIMER the pacer clock is used to start each scan. The cmd->scan_begin_arg specifies the scan time. The minimum (not maximum) value for this time must be large enough for the 'burst' conversion time to sample all the channels. The current 'max' check limits the scan time to the minimum time (i.e. the max conversion speed). 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