linux/drivers/staging
H Hartley Sweeten f3d3dad659 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>
2014-09-11 14:34:25 -07:00
..
android staging: binder: fix coding style issues 2014-09-08 13:29:01 -07:00
bcm staging: bcm: sort.c: fix coding style 2014-09-08 14:01:17 -07:00
board
comedi staging: comedi: adl_pci9118: clarify acquisition mode (ai_do) determination 2014-09-11 14:34:25 -07:00
cptm1217
dgap drivers: staging: dgap: fix the checkpatch.pl issue "Warning: line over 80 characters" 2014-09-06 21:46:55 -07:00
dgnc staging: dgnc: split two assignments into the two assignments on two lines. 2014-09-02 10:44:33 -07:00
emxx_udc staging: emxx_udc: remove check for CONFIG_MACH_EMGR 2014-09-08 13:48:01 -07:00
et131x staging: et131x: Fix whitespace - alignment matching open parenthesis 2014-09-08 13:47:01 -07:00
ft1000 drivers: staging: ft1000: Fix return is not a function, parentheses are not required errors 2014-09-02 10:48:32 -07:00
fwserial
gdm72xx Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-08-06 09:38:14 -07:00
gdm724x Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next 2014-08-06 09:38:14 -07:00
goldfish staging: goldfish: avoid multiple assignments 2014-09-06 21:54:57 -07:00
gs_fpgaboot staging: gs_fpgaboot: remove checks for CONFIG_B4860G100 2014-09-08 14:00:07 -07:00
iio staging:iio: Remove ad5930/ad9850/ad9852/ad9910/ad9951 dummy drivers 2014-08-19 20:25:10 +01:00
imx-drm IPUv3 CPMEM API change across staging and drm 2014-09-11 14:27:19 -07:00
line6
lustre staging: clean up checkpatch warnings in lustre 2014-09-08 15:22:52 -07:00
media Staging driver patches for 3.17-rc1 2014-08-04 18:36:12 -07:00
mt29f_spinand staging/mt29f_spinand: coding style fixes 2014-08-16 12:23:27 -07:00
netlogic staging: netlogic: fix checkpatch.pl "LINE_SPACING" issuses 2014-09-08 14:02:13 -07:00
nvec staging/nvec: Use platform_get_irq() 2014-07-30 17:18:47 -07:00
octeon
octeon-usb Staging: octeon-hcd: removed unwanted return from void 2014-09-08 14:06:52 -07:00
olpc_dcon
ozwpan staging: ozwpan: use kmalloc_array over kmalloc with multiply 2014-09-08 13:26:33 -07:00
panel
rtl8188eu staging: rtl8188eu: Remove HalPhyRf_8188e.c 2014-09-08 14:05:51 -07:00
rtl8192e staging: rtl8192e: fixed coding style issues 2014-08-30 13:54:03 -07:00
rtl8192ee staging: rtl8192ee: Fix RT_TRACE #define and uses 2014-08-16 12:23:11 -07:00
rtl8192u staging/rtl8192u - check for skb alloc failure 2014-09-08 15:22:52 -07:00
rtl8712 staging:rtl8712:mlme_linux.c: Adds blank lines to pass checkpatch.pl 2014-07-30 17:05:56 -07:00
rtl8723au drivers: staging: rtl8723au: Fix '"(foo*)" should be "(foo *)"' errors 2014-09-08 14:02:12 -07:00
rtl8821ae drivers: staging: rtl8821ae: Fix '"(foo*)" should be "(foo *)"' errors 2014-09-08 14:01:17 -07:00
rts5208 staging: rts5208: Remove casting the return value which is a void pointer 2014-08-30 14:07:37 -07:00
skein
slicoss staging: slicoss: fix a blank line coding style issue 2014-08-16 12:23:13 -07:00
speakup Update speakup mailing list address 2014-07-18 16:36:29 -07:00
ste_rmi4
unisys staging: unisys: uislib: uislib.c: sparse warning of context imbalance 2014-09-08 13:20:17 -07:00
vme staging: vme: remove redundant else condition 2014-08-30 14:06:47 -07:00
vt6655 staging: vt6655: device_free_info() warn: variable dereferenced before check 2014-09-08 14:01:17 -07:00
vt6656 staging: vt6656: remove rate_control_algorithm pid 2014-09-08 14:01:17 -07:00
wlan-ng Staging: wlan-ng: Remove redundant break/goto statements in hfa384x_usb.c 2014-09-08 14:02:48 -07:00
xgifb staging: xgifb: remove unnecessary else 2014-09-06 21:48:19 -07:00
xillybus staging: xillybus: Removed unnecessary cast 2014-09-08 13:59:25 -07:00
Kconfig Merge 3.17-rc3 into staging-next 2014-08-31 20:53:12 -07:00
Makefile Merge 3.17-rc3 into staging-next 2014-08-31 20:53:12 -07:00
staging.c