diff options
| author | H Hartley Sweeten <hsweeten@visionengravers.com> | 2014-09-09 13:05:49 -0700 |
|---|---|---|
| committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2014-09-11 14:34:25 -0700 |
| commit | f3d3dad659df423f46ea8ec5050eb1af69eb1bf1 (patch) | |
| tree | 5d1e1177e9e3edc57e37e231f48476970a267a60 /include/linux/timerqueue.h | |
| parent | abaaa7f83a505f9a6cd0405d1dc92ab19a0c7805 (diff) | |
staging: comedi: adl_pci9118: clarify acquisition mode (ai_do) determination
The async command can operation in 4 modes in this driver.
Modes 1 and 4 use timers 1 and 2 as a cascaded timer to trigger each conversion.
Mode 1 begins the acquisitions immediately (scan_begin_src == TRIG_FOLLOW) and
Mode 4 begins after an external trigger (scan_begin_src == TRIG_EXT). Both modes
use a convert_src == TRIG_TIMER.
Mode 2 uses timers 1 and 2 in a double timed action (scan_begin_src == TRIG_TIMER
and convert_src != TRIG_EXT (TRIG_TIMER and TRIG_NOW are valid)).
Mode 3 does not use the timers. Each acquisition is triggered by an external
signal (scan_begin_src == TRIG_FOLLOW and convert_src == TRIG_EXT.
The (*do_cmdtest) validates the scan_begin_src as TRIG_FOLLOW, TRIG_TIMER,
or TRIG_EXT. Remove the invalid check for TRIG_INT in the (*do_cmd).
Clarify the logic used to determine the mode in the (*do_cmd).
Also, simplify pci9118_calc_divisors(). Call i8253_cascade_ns_to_timer() directly
in the (*do_cmd) for the mode 1 and mode 4 cases. Call pci9118_calc_divisors()
only for mode 2 acquisitions.
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>
Diffstat (limited to 'include/linux/timerqueue.h')
0 files changed, 0 insertions, 0 deletions
