staging/comedi/drivers/usbduxsigma.c: added support for ehci drivers
authorBernd Porr <mail@berndporr.me.uk>
Wed, 22 Jul 2015 17:46:39 +0000 (18:46 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 23 Jul 2015 03:54:38 +0000 (20:54 -0700)
commitd5a372df8661113b8aa36f4eb29d4b969d1d3db4
tree2558ec8b829fa13438255ace07802f150cca080f
parente73063c5407b6ffe09dc0f7c11970113bf55e6fc
staging/comedi/drivers/usbduxsigma.c: added support for ehci drivers

urb->interval is deprecated and thus I've changed the driver
that it now always assumes interval=1 which means every frame
in USB 1.1 and every uframe in USB 2.0. However we still need
to have different sampling rates which are still multiples
of the interval which is now transmitted to the firmware.
The firmware transmits either zero length packets or none every (u)frame.
This is checked in the completion handler and any packet
at zero length is discarded so that comedi again sees the data
coming in at the interval specified. This also then gives the ADC
the necessary time to convert. For example 16 channels require
about 700us and in this period no packet could be transmitted.
In this case this is padded up to 1ms so that we have then 7 zero
length packets and one packet with the ADC data.

Signed-off-by: Bernd Porr <mail@berndporr.me.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/staging/comedi/drivers/usbduxsigma.c
This page took 0.025206 seconds and 5 git commands to generate.