[PATCH] comedi: fix minimum AO period for NI 625x and NI 628x

Ian Abbott abbotti at mev.co.uk
Wed Dec 19 16:43:03 UTC 2012

On 19/12/12 12:03, Éric Piel wrote:
> The minimum period was set to 357 ns, while the divider for these boards is 50
> ns. This prevented to output at maximum speed as ni_ao_cmdtest() would return
> 357 but would not accept it.
> Not sure why it was set to 357 ns (this was done before the git history,
> which starts 5 years ago). My guess is that it comes from reading the
> specification stating a 2.8 MHz rate (~ 357 ns). The latest
> specification states a 2.86 MHz rate (~ 350 ns), which makes a lot
> more sense.
> Tested on a pci-6251.
> Signed-off-by: Éric Piel <piel at delmic.com>
> Cc: Ian Abbott <abbotti at mev.co.uk>
> Cc: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
> Cc: <devel at driverdev.osuosl.org>
> Cc: <stable at vger.kernel.org>

Acked-By: Ian Abbott <abbotti at mev.co.uk>

Looks reasonable.  The AO speed checks were added to the NI drivers (in 
the out-of-tree Comedi sources before they were imported into "staging") 
in early May 2007 but probably weren't tested to the limits.

(I'll make the same change to the out-of-tree Comedi sources on 

-=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti at mev.co.uk>        )=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587         )=-

More information about the devel mailing list