]> git.karo-electronics.de Git - karo-tx-linux.git/commit
staging: comedi: ni_labpc_common: convert driver to use the comedi_8254 module
authorH Hartley Sweeten <hsweeten@visionengravers.com>
Mon, 23 Feb 2015 21:58:02 +0000 (14:58 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 2 Mar 2015 02:53:52 +0000 (18:53 -0800)
commitc0cfeca1a80efbb7691961d4ac31af30c559f976
tree4b95ce59d1a0da900bd98e4124cd25717f855de3
parent5a213fa6f7c33219300bdd826d77172bfd5a54e6
staging: comedi: ni_labpc_common: convert driver to use the comedi_8254 module

This driver uses an 8254 timer to generate the pacer clock used for analog
input data conversion. Convert it to use the comedi_8254 module to provide
support for the 8254 timer.

The hardware actually has two 8254 devices. Timer B0 is the master for timed
conversions, timer B1 sets the scan pacing, and tmer A0 sets the conversion
pacing.

For the conversion, dev->pacer is used for the "B" timers and a new private
data member, dev->counter, is used for the "A" timers. All the divisor values
are stored in the dev->pacer.

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>
drivers/staging/comedi/Kconfig
drivers/staging/comedi/drivers/ni_labpc.c
drivers/staging/comedi/drivers/ni_labpc.h
drivers/staging/comedi/drivers/ni_labpc_common.c
drivers/staging/comedi/drivers/ni_labpc_cs.c
drivers/staging/comedi/drivers/ni_labpc_pci.c