Commit Graph

150 Commits

Author SHA1 Message Date
H Hartley Sweeten 25182d2751 staging: comedi: amplc_pci230: 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.

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>
2015-03-01 18:51:51 -08:00
H Hartley Sweeten 48a4f22266 staging: comedi: adv_pci1710: convert driver to use the comedi_8254 module
This driver uses an 8254 timer to generate the pacer clock used for analog
input data acquisition. It also provides a comedi_subdevice to allow the user
to use channel 0 of the 8254 timer. Currently the subdevice support does not
work correctly due to and (*insn_config) that does not follow the comedi API.

Convert it to use the comedi_8254 module to provide support for the 8254 timer
and proper support for the subdevice.

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>
2015-03-01 18:51:50 -08:00
H Hartley Sweeten a90feb7fd0 staging: comedi: cb_das16_cs: convert driver to use the comedi_8254 module
The hardware supported by this drive has an 8254 timer. Currently this driver
does not use the timer functions.

For aesthetics, use the comedi_8254 module to provide support for the 8254
timer. This will ensure that the counters are all reset and make it easier
to add functionality later.

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>
2015-03-01 18:51:50 -08:00
H Hartley Sweeten eb9bb1f5a8 staging: comedi: das16m1: convert driver to use the comedi_8254 module
This driver uses two 8254 timers. One to generate the analog input pacer clock and
one to count the number of samples. Convert it to use the comedi_8254 module to
provide support for the 8254 timers.

Use the comedi_device 'pacer' member for the 8254 timer used for analog input. This
data is freed automatically by the core during the detach of the driver.

Store the data for the 8254 timer used to count samples in the private data. This
data needs to be freed by the driver when it is detached.

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>
2015-03-01 18:51:50 -08:00
H Hartley Sweeten e4690dec50 staging: comedi: das800: convert driver to use the comedi_8254 module
This driver uses an 8254 timer to generate the pacer clock used for analog
input data acquisition. Convert it to use the comedi_8254 module to provide
support for the 8254 timer.

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>
2015-03-01 18:51:50 -08:00
H Hartley Sweeten 96e5624411 staging: comedi: cb_pcidas: convert driver to use the comedi_8254 module
This driver uses two 8254 timers to generate the pacer clocks. One for analog
input acquisition and one for analog output data conversion. Convert it to use
the comedi_8254 module to provide support for the 8254 timers.

Use the comedi_device 'pacer' member for the 8254 timer used for analog input.
This data is freed automatically by the core during the detach of the driver.

Store the data for the 8254 timer used for analog output in the private data.
This data needs to be freed by the driver when it is detached.

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>
2015-03-01 18:51:50 -08:00
H Hartley Sweeten 6aa37d7916 staging: comedi: amplc_pci224: convert driver to use the comedi_8254 module
This driver uses an 8254 timer to generate the pacer clock used for analog
output data conversion. Convert it to use the comedi_8254 module to provide
support for the 8254 timer.

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>
2015-03-01 18:51:50 -08:00
H Hartley Sweeten 0880acf846 staging: comedi: adl_pci9111: convert driver to use the comedi_8254 module
This driver uses an 8254 timer to generate the pacer clock used for analog
input data acquisition. Convert it to use the comedi_8254 module to provide
support for the 8254 timer.

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>
2015-03-01 18:51:50 -08:00
H Hartley Sweeten 9ef02dea59 staging: comedi: pcl711: convert driver to use the comedi_8254 module
This driver uses an 8254 timer to generate the pacer clock used for analog
input data acquisition. Convert it to use the comedi_8254 module to provide
support for the 8254 timer.

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>
2015-03-01 18:51:50 -08:00
H Hartley Sweeten 18c284c68b staging: comedi: pcl818: convert driver to use the comedi_8254 module
This driver uses an 8254 timer to generate the pacer clock used for analog
input data acquisition. Convert it to use the comedi_8254 module to provide
support for the 8254 timer.

Note that the pacer does not have to be stopped when starting a new async
command in pcl818_ai_cmd() or when the card is initialy reset by pcl818_reset().
The counters are all reset when the driver is initially attached and the
counters used by the pacer are stopped when a command is canceled.

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>
2015-03-01 18:51:50 -08:00
H Hartley Sweeten f48c21fc62 staging: comedi: pcl816: 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.

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>
2015-03-01 18:51:50 -08:00
H Hartley Sweeten fb5678aff3 staging: comedi: pcl812: convert driver to use the comedi_8254 module
This driver uses an 8254 timer to generate the pacer clock used for analog
input data acquisition. Convert it to use the comedi_8254 module to provide
support for the 8254 timer.

Note that the pacer does not have to be stopped when starting a new async
command in pcl812_ai_cmd() or when the card is initialy reset by pcl812_reset().
The counters are all reset when the driver is initially attached and the
counters used by the pacer are stopped when a command is canceled.

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>
2015-03-01 18:51:50 -08:00
H Hartley Sweeten d42b5211d8 staging: comedi: comedi_8254: introduce module for 8254 timer support
A 8254 timer/counter is commonly used on data acquisition boards to provide
the internal pacer clock used to acquire analog input samples. Some boards
also to allow the timers to be used externally.

Currently the 8254 timers are supported by comedi using the 8253.h header
and a number of inline functions. This works for the internal pacer clock
but requires the drivers to implement subdevice code necessary to use the
timers externally.

Introduce a new module to support both the internal pacer clock and the
external counter subdevice. This will allow removing a bunch of duplicated
code in the drivers and standardizes the comedi 8254 timer support.

This implementation is based on the 8253.h inline functions and the various
subdevice functionality in the comedi drivers.

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>
2015-03-01 18:51:49 -08:00
H Hartley Sweeten cf0438c9c3 staging: comedi: ni_labpc_isadma: use comedi_isdma module
The labpc driver has already had the depends on ISA_DMA_API limitation removed
by moving all the DMA support code into the labpc_isadma module.

For aesthetics, use the comedi_isadma module to provide the actual ISA DMA
support.

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>
2015-01-17 14:32:55 -08:00
H Hartley Sweeten 1a97f144e3 staging: comedi: ni_at_a2150: remove depends on ISA_DMA_API limitation
Use the new comedi_isadma module to provide the ISA DMA support. This removes
all the ISA_DMA_API code from this driver and allows the driver to be used on
platforms that don't support the ISA_DMA_API.

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>
2015-01-17 14:32:55 -08:00
H Hartley Sweeten 860f7c0919 staging: comedi: dt282x: remove depends on ISA_DMA_API limitation
Use the new comedi_isadma module to provide the ISA DMA support. This removes
all the ISA_DMA_API code from this driver and allows the driver to be used on
platforms that don't support the ISA_DMA_API.

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>
2015-01-17 14:32:55 -08:00
H Hartley Sweeten 99dfc3357e staging: comedi: das1800: remove depends on ISA_DMA_API limitation
Use the new comedi_isadma module to provide the ISA DMA support. This removes
all the ISA_DMA_API code from this driver and allows the driver to be used on
platforms that don't support the ISA_DMA_API.

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>
2015-01-17 14:32:55 -08:00
H Hartley Sweeten 1400964a2b staging: comedi: das16: remove depends on ISA_DMA_API limitation
Use the new comedi_isadma module to provide the ISA DMA support. This removes
all the ISA_DMA_API code from this driver and allows the driver to be used on
platforms that don't support the ISA_DMA_API.

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>
2015-01-17 14:32:55 -08:00
H Hartley Sweeten f3df482a0c staging: comedi: pcl812: remove depends on ISA_DMA_API limitation
Use the new comedi_isadma module to provide the ISA DMA support. This removes
all the ISA_DMA_API code from this driver and allows the driver to be used on
platforms that don't support the ISA_DMA_API.

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>
2015-01-17 14:32:55 -08:00
H Hartley Sweeten bd7ea421e3 staging: comedi: pcl816: remove depends on ISA_DMA_API limitation
Use the new comedi_isadma module to provide the ISA DMA support. This removes
all the ISA_DMA_API code from this driver and allows the driver to be used on
platforms that don't support the ISA_DMA_API.

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>
2015-01-17 14:32:55 -08:00
H Hartley Sweeten dd7c0f0416 staging: comedi: pcl818: remove depends on ISA_DMA_API limitation
Use the new comedi_isadma module to provide the ISA DMA support. This removes
all the ISA_DMA_API code from this driver and allows the driver to be used on
platforms that don't support the ISA_DMA_API.

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>
2015-01-17 14:32:54 -08:00
H Hartley Sweeten 20a1ea7d6b staging: comedi: comedi_isadma: introduce helper module for ISA DMA
Introduce a new helper module to consolidate all the ISA DMA code. This will
allow removing the "depends on ISA_DMA_API" from the legacy drivers that can
use DMA for async command support.

This module is complete based on the various uses of ISA DMA in the comedi
drivers.

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>
2015-01-17 14:32:54 -08:00
H Hartley Sweeten ef98a104c2 staging: comedi: dt282x: remove VIRT_TO_BUS dependancy
Use dma_{alloc,free}_coherent() to allocate and free the DMA buffers.
This removes the dependancy on VIRT_TO_BUS.

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>
2015-01-17 14:25:21 -08:00
H Hartley Sweeten 9fe11ffeb1 staging: comedi: pcl812: remove VIRT_TO_BUS dependancy
Use dma_{alloc,free}_coherent() to allocate and free the DMA buffers.
This removes the dependancy on VIRT_TO_BUS.

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>
2015-01-17 14:25:21 -08:00
H Hartley Sweeten a2c3966d18 staging: comedi: pcl816: remove VIRT_TO_BUS dependancy
Use dma_{alloc,free}_coherent() to allocate and free the DMA buffers.
This removes the dependancy on VIRT_TO_BUS.

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>
2015-01-17 14:25:21 -08:00
H Hartley Sweeten 7a37b7a755 staging: comedi: pcl818: remove VIRT_TO_BUS dependancy
Use dma_{alloc,free}_coherent() to allocate and free the DMA buffers.
This removes the dependancy on VIRT_TO_BUS.

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>
2015-01-17 14:25:20 -08:00
H Hartley Sweeten 05e511cf96 staging: comedi: ni_labpc: remove VIRT_TO_BUS dependancy
Use dma_{alloc,free}_coherent() to allocate and free the DMA buffers.
This removes the dependancy on VIRT_TO_BUS.

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>
2015-01-17 14:25:20 -08:00
H Hartley Sweeten 6d26275177 staging: comedi: ni_at_a2150: remove VIRT_TO_BUS dependancy
Use dma_{alloc,free}_coherent() to allocate and free the DMA buffers.
This removes the dependancy on VIRT_TO_BUS.

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>
2015-01-17 14:25:19 -08:00
H Hartley Sweeten a4b064ee46 staging: comedi: das1800: remove VIRT_TO_BUS dependancy
Use dma_{alloc,free}_coherent() to allocate and free the DMA buffers.
This removes the dependancy on VIRT_TO_BUS.

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>
2015-01-17 14:25:19 -08:00
H Hartley Sweeten ffcc4b59de staging: comedi: adl_pci9118: remove VIRT_TO_BUS dependancy
This driver no longer uses virt_to_bus(). Remove the dependancy.

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>
2015-01-17 14:25:18 -08:00
H Hartley Sweeten 387ca51f7c staging: comedi: dmm32at: use 8255 module for Digital I/O subdevice
The Dimond-MM-32-AT board uses an internal 82C55-type digital I/O circuit to
provide the 24 digital I/O lines. The only quirk is the need to set the page
selection bits in the control register to select page 1 addresses.

Instead of duplicating the 8255 code, provide an (*io) callback and use the
8255 module to support this subdevice.

This also removes the need for the private data in this driver.

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-11-26 15:33:24 -08:00
Ian Abbott bc3fe15655 staging: comedi: split out PCI support into new module
Setting the `CONFIG_COMEDI_PCI_DRIVERS` kernel configuration option
makes the main "comedi" module depend on the PCI support in the kernel.
That's not that big a deal since PCI support in the kernel is either
built into the kernel or is absent, and is not in a separate module.
Still, not all low-level Comedi drivers need PCI support, so we could
save a bit of space by not including it.  The Comedi PCI support
functions are all in "comedi_pci.c".  Turn it into a separate module so
the support code doesn't have to be loaded unnecessarily.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07 09:24:33 -08:00
Ian Abbott ba9ac25e96 staging: comedi: split out USB support into new module
Setting the `CONFIG_COMEDI_USB_DRIVERS` kernel configuration option
makes the main "comedi" module depend on the "usbcore" module.  But
perhaps the machine has no USB controllers (or they have been disabled),
in which case the "usbcore" module may have been pulled in
unnecessarily.  Only a few low-level Comedi drivers require USB support.
The Comedi USB support functions are all in "comedi_usb.c".  Turn it
into a separate module so we don't have to pull in the "usbcore" and
"usb_common" modules unnecessarily.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07 09:24:33 -08:00
Ian Abbott aae434b3c3 staging: comedi: split out PCMCIA support into new module
Setting the `CONFIG_COMEDI_PCMCIA_DRIVERS` kernel configuration option
makes the main "comedi" module depend on the "pcmcia" module, but many
machines don't have PCMCIA slots and only a few low-level Comedi drivers
need PCMCIA support.  The Comedi PCMCIA support functions are all in
"comedi_pcmcia.c".  Turn it into a separate module so we don't have to
pull in the other PCMCIA support modules unnecessarily.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-07 09:24:33 -08:00
Greg Kroah-Hartman 7cbe010a5e Merge 3.18-rc3 into staging-next
We want the upstream fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-11-02 18:06:03 -08:00
Ian Abbott 0ea6fa037e staging: comedi: Kconfig: fix config COMEDI_ADDI_APCI_3120 dependants
A merge conflict between commits
fbfd9c8a17 ("staging: comedi:
addi_apci_3120: use dma_alloc_coherent()") and
aff5b1f8eb ("staging: comedi: remove
comedi_fc module") left the COMEDI_ADDI_APCI_3120 config option
depending on VIRT_TO_BUS when it no longer needs to do so.  The
dependency was removed by the first commit and accidentally reinstated
by the second commit.  Remove the dependency again.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 16:18:31 +08:00
H Hartley Sweeten 4a3df1540b staging: comedi: addi_apci_035: remove driver
According to ADDI-DATA, this board was discontinued last year and they
feel that no further development is needed for this driver. Remove the
driver from comedi to help with the addi-data cleanup.

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-10-29 15:56:53 +08:00
Ian Abbott 4e3d14af12 staging: comedi: cb_pcimdas: add support for PCIe-DAS1602/16
The Measurement Computing PCIe-DAS1602/16 is a PCI-Express version of
the PCIM-DAS1602/16, but has a different PCI device ID.  Add support
for this device and update the driver description, Kconfig description
and MODULE_DESCRIPTION.

Thanks to Christoph Langbein for supplying the PCI device ID.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-10-29 15:45:05 +08:00
Chen Gang ab608c2478 drivers/staging/comedi/Kconfig: Let COMEDI_II_PCI20KC depend on HAS_IOMEM
COMEDI_II_PCI20KC needs HAS_IOMEM, so depend on it. The related error (
with allmodconfig under um):

    CC [M]  drivers/staging/comedi/drivers/ii_pci20kc.o
  drivers/staging/comedi/drivers/ii_pci20kc.c: In function ‘ii20k_attach’:
  drivers/staging/comedi/drivers/ii_pci20kc.c:442:2: error: implicit declaration of function ‘ioremap’ [-Werror=implicit-function-declaration]
    dev->mmio = ioremap(membase, II20K_SIZE);
    ^
  drivers/staging/comedi/drivers/ii_pci20kc.c:442:12: warning: assignment makes pointer from integer without a cast [enabled by default]
    dev->mmio = ioremap(membase, II20K_SIZE);
              ^
  drivers/staging/comedi/drivers/ii_pci20kc.c: In function ‘ii20k_detach’:
  drivers/staging/comedi/drivers/ii_pci20kc.c:512:3: error: implicit declaration of function ‘iounmap’ [-Werror=implicit-function-declaration]
     iounmap(dev->mmio);
     ^

Signed-off-by: Chen Gang <gang.chen.5i5j@gmail.com>
Reviewed-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-10-20 10:56:17 +08:00
Ian Abbott aff5b1f8eb staging: comedi: remove comedi_fc module
All the exported functions in the "comedi_fc" module have been migrated
to the core "comedi" module and renamed, so it is now just a dummy
module.  Remove it.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 15:56:49 -07:00
Ian Abbott fbfd9c8a17 staging: comedi: addi_apci_3120: use dma_alloc_coherent()
Use `dma_alloc_coherent()` to allocate the DMA buffers instead of
using `__get_free_pages()` to allocate and `virt_to_bus()` to get the
hardware address.  The coherent buffers are fairly small - at most 4
pages (although there are two of them).  Use of `virt_to_bus()` is
discouraged.

Note: `struct addi_private` is used by some other ADDI-DATA drivers as
well, but this is the only one using the affected members.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 15:39:39 -07:00
Ian Abbott 75fbdbf61d staging: comedi: adl_pci9118: use dma_alloc_coherent()
Use `dma_alloc_coherent()` to allocate the DMA buffers instead of
using `__get_free_pages()` to allocate and `virt_to_bus()` to get the
hardware address.  The coherent buffers are fairly small - at most 4
pages (although there are two of them).  Use of `virt_to_bus()` is
discouraged.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-09-19 15:36:25 -07:00
H Hartley Sweeten 4258d61c14 staging: comedi: skel: remove driver
The comedi skeleton driver is one of the few "hybrid" drivers with
both legacy and PCI attach mechanisms. Instead of splitting this
driver, just remove it. There are many other comedi drivers that
provide better examples.

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-08 13:44:22 -07:00
Ian Abbott 9f3a773808 staging: comedi: Kconfig: make COMEDI_BOND select COMEDI_KCOMEDILIB
Currently, to select the "comedi_bond" driver, the "kcomedilib" support
has to be selected first.  It seems more natural to allow the
"comedi_bond" driver to be selected on its own and to automatically
select the "kcomedilib" module as a result of that.  Change the
dependency/select relationship between the two configuration options to
do that.

Also, make "kcomedilib" a module that can be selected independently,
perhaps for use by out-of-tree modules, although it is not terribly
useful for anything other than "comedi_bond" currently.

Also, improve the help text for the config options.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-30 13:28:15 -07:00
Luca Ellero a03bb00e50 staging: comedi: add NI USB-6501 support
Enable support for the National Instruments USB-6501 module.

The NI USB-6501 is a Full-Speed USB 2.0 (12 Mbit/s) device that
provides 24 digital I/O lines channels and one 32-bit counter.

This is a preliminary version:
	GPIO: works
	counter: doesn't work

Signed-off-by: Luca Ellero <luca.ellero@brickedbrain.com>
Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-08-16 12:23:10 -07:00
Ian Abbott 4cb60db2ea staging: comedi: amplc_pc236: split into ISA, PCI and common module
The "amplc_pc236" driver currently handles both ISA and PCI devices and
uses a small amount of conditional compilation depending which are
enabled.

Move most of the functionality into a new module, "amplc_pc236_common",
and split off support for PCI devices into a new module, "amplc_pci236".
Retain support for ISA devices in the existing module, "amplc_pc236".

Since the `detach` handler (`pc236_detach()`) in the existing module
"amplc_pc236" now only needs to handle ISA devices and only calls
`comedi_legacy_detach()`, just use `comedi_legacy_detach()` directly as
the `detach` handler in `struct comedi_driver amplc_pc236_driver`.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-07-30 16:48:42 -07:00
H Hartley Sweeten 39798450a4 staging: comedi: ni_670x: remove COMEDI_MITE and HAS_DMA dependancy
The mite module provides the DMA interface for the PCI MITE ASIC used on
many National Instruments DAQ boards. This driver does not use DMA and only
depends on the mite module to initialize the MITE ASIC.

Handle the initialization localy and remove the unnecessary dependancies.

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-07-16 13:21:38 -07:00
H Hartley Sweeten b965b77f7c staging: comedi: ni_65xx: remove COMEDI_MITE and HAS_DMA dependancy
The mite module provides the DMA interface for the PCI MITE ASIC used on
many National Instruments DAQ boards. This driver does not use DMA and only
depends on the mite module to initialize the MITE ASIC.

Handle the initialization localy and remove the unnecessary dependancies.

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-07-16 13:21:38 -07:00
H Hartley Sweeten 319a883bfd staging: comedi: ni_labpc_pci: remove COMEDI_MITE and HAS_DMA dependancy
The mite module provides the DMA interface for the PCI MITE ASIC used on
many National Instruments DAQ boards. This driver does not use DMA and only
depends on the mite module to initialize the MITE ASIC.

Handle the initialization localy and remove the unnecessary dependancies.

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-07-16 13:21:38 -07:00
Greg Kroah-Hartman ef7994fa2a Merge 3.16-rc2 into staging-next
We want the staging fixes here as well.
2014-06-22 12:33:51 -04:00