Commit Graph

174 Commits

Author SHA1 Message Date
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
Arnd Bergmann 88513624be staging: comedi: addi_apci_1564: add addi_watchdog dependency
With commit aed3f9d498 ("staging: comedi: addi_apci_1564:
absorb apci1564_reset()"), the apci 1564 driver has gained
a dependency on the addi watchdog module, which is not reflected
correctly in Kconfig, and that can lead to link errors
when the watchdog is disabled.

This adds an explicit 'select', like it is done in the other
addi apci drivers that need it.

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-18 15:11:22 -07:00
H Hartley Sweeten 55e51bad35 staging: comedi: pcl724: add support for Diamond Systems ONYX-MM-DIO module
The Diamond Systems ONYX-MM-DIO board is a PC/104 module with two 8255
chips providing 48 digital I/O channels.

This board can be supported by the pcl724 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-06-18 14:41:31 -07:00
H Hartley Sweeten 757c1fa9e1 staging: comedi: pcl730: add support for Diamond Systems IR104-PBF module
The Diamond Systems IR104-PBF board is a PC/104 module with 20
optoisolated inputs and 20 relay outputs.

This board can be supported by the pcl730 driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregk@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-06-18 14:41:25 -07:00
H Hartley Sweeten 53030b138e staging: comedi: pcl730: add support for Diamond Systems PC/104 modules
The Diamond Systems OPMM-1616-XT board is a PC/104 module with 16
optoisolated inputs and 16 relay outputs.

The PEARL-MM-P board is a PC/104 module with 16 relay outputs.

Both of these boards can be supported by the pcl730 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-05-23 21:23:37 +09:00
H Hartley Sweeten b6512cfcd2 staging: comedi: poc: remove obsolete driver
The DAC02 board, which is the only board supported by this driver, now
has its own comedi driver (dac02).

Remove this obsolete driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-03-20 01:57:01 +00:00
H Hartley Sweeten 99999e2747 staging: comedi: dac02: introduce comedi driver for DAC02 boards
This board is currently supported by the poc driver. That driver used
to support a number of simple boards but now only provides support for
the DAC02 board.

Introduce a new comedi driver specifically for the DAC02 board. This
allows cleaning up all the cruft.

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-03-17 14:12:56 -07:00
H Hartley Sweeten fb6aa25009 staging: comedi: quatech_daqp_cs: use cfc_handle_events()
Use the comedi_fc helper function to automatically call the subdevice
(*cancel) function when needed and call comedi_event().

Update the Kconfig so that COMEDI_QUATECH_DAQP_CS selects COMEDI_FC.

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-03-17 13:55:57 -07:00
H Hartley Sweeten d288151847 staging: comedi: dt3000: use cfc_handle_events()
Use the comedi_fc helper function to automatically call the subdevice
(*cancel) function when needed and call comedi_event().

Update the Kconfig so that COMEDI_DT3000 selects COMEDI_FC.

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-03-17 13:55:56 -07:00
H Hartley Sweeten 2f1f7ea0c5 staging: comedi: pcl818: use cfc_handle_events()
Use the comedi_fc helper function to automatically call the subdevice
(*cancel) function when needed and call comedi_event().

Update the Kconfig so that COMEDI_PCL818 selects COMEDI_FC.

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-03-17 13:55:56 -07:00
H Hartley Sweeten 61c3393f93 staging: comedi: pcl816: use cfc_handle_events()
Use the comedi_fc helper function to automatically call the subdevice
(*cancel) function when needed and call comedi_event().

Update the Kconfig so that COMEDI_PCL816 selects COMEDI_FC.

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-03-17 13:55:56 -07:00
H Hartley Sweeten 8a8bd45441 staging: comedi: pcl812: use cfc_handle_events()
Use the comedi_fc helper function to automatically call the subdevice
(*cancel) function when needed and call comedi_event().

Update the Kconfig so that COMEDI_PCL812 selects COMEDI_FC.

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-03-17 13:55:55 -07:00
H Hartley Sweeten a18fad85cc staging: comedi: adv_pci1710: use cfc_handle_events()
Use the comedi_fc helper function to automatically call the subdevice
(*cancel) function when needed and call comedi_event().

Update the Kconfig to select COMEDI_FC when COMEDI_ADL_PCI9111 is enabled.

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-03-17 13:55:54 -07:00
H Hartley Sweeten a1b5b0bfcd staging: comedi: comedi_fc: export cfc_bytes_per_scan()
This helper function is a bit long to be inlined. Move it to the
source file and export it.

The mite driver is the only external user right now. Update the
Kconfig to select COMEDI_FC when COMEDI_MITE is enabled.

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-03-17 13:55:53 -07:00
Rostislav Lisovy 04b565021a comedi: Humusoft MF634 and MF624 DAQ cards driver
This patch adds Comedi driver for Humusoft MF634 (PCIe) and
MF624 (PCI) data acquisition cards. The legacy card Humusoft
MF614 is not supported. More info about the cards may be found
at http://humusoft.cz/produkty/datacq/
The driver was tested with both cards. Everything seems to work
properly. Just the basic functionality of the card (DIO, ADC, DAC)
is supported by this driver.

Signed-off-by: Rostislav Lisovy <lisovy@gmail.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2014-01-13 15:03:12 -08:00
H Hartley Sweeten 42e705e91f staging: comedi: ni_6527: remove COMEDI_MITE dependancy
The COMEDI_MITE driver is a wrapper for the National Instruments
PCI MITE ASIC. This driver includes the PCI boilerplate used to
remap the resources as well as the support code for bus mastered
DMA.

The ni_6527 does not support DMA and the COMEDI_MITE driver adds
unnecessary complexity.

Remove the need for the COMEDI_MITE driver by handling the ioremap
directly in the (*attach). Store the ioremap'ed address in the
private data.

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>
2013-10-03 14:10:03 -07:00
H Hartley Sweeten 48c8cd291c staging: comedi: Kconfig: COMEDI_NI_ATMIO should select COMEDI_FC
As pointed out by the kbuild test robot, the ni_atmio driver includes
ni_mio_common.c which uses the helper functions in the comedi_fc module.

Select the COMEDI_FC module when COMEDI_NI_ATMIO is enabled to fix the
following build error:

ERROR: "cfc_write_array_to_buffer" [drivers/staging/comedi/drivers/ni_atmio.ko] undefined!

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reported-by: Fengguang Wu <fengguang.wu@intel.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-26 16:36:18 -07:00
Ben Hutchings 650433b8b1 Staging: comedi: Fix dependencies for drivers misclassified as PCI
The Fastwel UNIOxx-5 is a PC/104 board, so put COMEDI_UNIOXX5 under
COMEDI_ISA_DRIVERS.

The DIL/Net-PC 1486 is a 486 system, so put COMEDI_SSV_DNP under
COMEDI_MISC_DRIVERS and add a dependency on X86_32 || COMPILE_TEST.

Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-09-17 07:39:28 -07:00
H Hartley Sweeten 62bf50cdfe staging: comedi: allow ISA and PC/104 drivers on non-ISA systems
Embedded systems with a PC/104 bus might have a configuration that
does not have ISA enabled. This creates a problem in Comedi where
the PC/104 drivers cannot be enabled.

Remove the 'depends on ISA' for the "Comedi ISA and PC/104 drivers"
menu to allow the user to select these drivers on non-ISA systems.

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>
2013-07-31 17:46:38 -07:00
Ian Abbott 4bed4f0388 staging: comedi: Kconfig: COMEDI_NI_ATMIO doesn't need to depend on ISAPNP
The COMEDI_NI_ATMIO configuration option causes the "ni_atmio" module to
be built, which handles various National Instruments ISA-PNP data
acquisition cards.  The configuration option currently depends on
ISAPNP.

The "ni_atmio" module is a "legacy" comedi driver with no
auto-configuration support and it doesn't register as a PNP card driver.
The only difference in initialization from the other comedi ISA card
drivers is that it will use the ISA-PNP functions to find, attach and
activate the card if no I/O base address has been specified by the user
in the COMEDI_DEVCONFIG ioctl.

The module compiles fine without the ISAPNP configuration option as the
<linux/isapnp.h> and <linux/pnp.h> headers provide dummy inline
functions if the ISAPNP and PNP options, respectively, are not enabled.

Remove the dependancy on the ISAPNP option since the module builds
without it and can be used without it.

(There is a very slim chance that comedi will support proper ISA PNP
drivers one day, in which case the ni_atmio driver could be converted to
use this support and not support manual configuration.  However, not all
the PnP IDs of boards supported by this driver are currently known to
us.)

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-26 15:05:03 -07:00
Ian Abbott 91f4491511 staging: comedi: Kconfig: COMEDI_NI_ATMIO16D should not depend on ISAPNP
The COMEDI_NI_ATMIO16D configuration option causes the "ni_atmio16d"
module to be built, which handles the National Instruments AT-MIO-16 and
AT-MIO-16D cards.  The configuration option currently depends on ISAPNP,
but the module doesn't use any ISAPNP functions and the cards are legacy
ISA cards with base I/O port, IRQ and DMA channel configured by jumpers.
(The driver doesn't use DMA though.)

Remove the ISADNP dependancy from COMEDI_NI_ATMIO16D and fix up the help
text - the card names are missing a dash and they're not ISA-PNP.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-26 15:05:03 -07:00
Ian Abbott 277bef860c staging: comedi: COMEDI_NI_LABPC_ISA no longer depends on VIRT_TO_BUS
After migrating ISA DMA support from the "ni_labpc" module to the new
"ni_labpc_isadma" module, the `COMEDI_NI_LABPC_ISA` configuration option
no longer depends on `VIRT_TO_BUS`, so remove the dependency.

(The new `COMEDI_NI_LABPC_ISADMA` option does depend on `VIRT_TO_BUS`
but is not configured manually and is only selected automatically if the
`VIRT_TO_BUS` and `ISA_DMA_API` options are set.)

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23 14:27:52 -07:00
Ian Abbott 9a6386623f staging: comedi: ni_labpc_isadma: new module for ISA DMA support
It's just an empty module at the moment, selected by COMEDI_NI_LABPC_ISA
&& ISA_DMA_API && VIRT_TO_BUS, but will be populated by later patches to
migrate ISA DMA support for NI Lab-PC cards out of the "ni_labpc"
module.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23 14:27:51 -07:00
H Hartley Sweeten ee68080d2c staging: comedi: pcl724: add support for the PCM-IO48 PC/104 board
This driver can support the WinSystems PCM-IO48 PC/104 board. That
board has two 8255 devices providing 48 digital I/O channels.

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>
2013-07-23 14:22:28 -07:00
H Hartley Sweeten 381102be5b staging: comedi: ii_pci20kc: this is an ISA board not a PCI board
The Intelligent Instrumentation PCI-20001C board is a legacy PC/XT/AT
8-bit ISA board not a PCI board.  The "PCI" appears to mean "Personal
Computer Instrumentation".

Move the Kconfig option into the COMEDI_ISA group.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Acked-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23 14:22:28 -07:00
H Hartley Sweeten ef5838d91d staging: comedi: pcl730: add support for the P8R8-DIO ISA board
The ICP P8R8-DIO ISA boards can be supported by this driver. This board
has 8 isolated digital outputs and 8 isolated digital outputs.

Add support for this board to the pcl730 driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-08 21:57:01 -07:00
H Hartley Sweeten 207fb16d53 staging: comedi: pcl730: add support for the ACL-7225b ISA board
The ACL-7225b and P16R16R-DIO ISA boards can be supported by this driver.
These board have 16 isolated digital outputs and 16 isolated digital
outputs.

Add support for these boards to the pcl730 driver and remove the
standalone acl7225b driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-08 21:57:00 -07:00
H Hartley Sweeten 85a1728574 staging: comedi: pcl730: add support for the PCL-734 ISA board
The PCL-734 ISA board can be supported by this driver. This board has
32 isolated digital outputs.

Add support for the PCL-734 board to the pcl730 driver and remove it
from the poc driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-08 21:56:59 -07:00
H Hartley Sweeten 82e71174ae staging: comedi: pcl730: add support for the PCL-733 ISA board
The PCL-733 ISA board can be supported by this driver. This board has
32 isolated digital inputs.

Add support for the PCL-733 board to the pcl730 driver and remove it
from the poc driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-08 21:56:58 -07:00
H Hartley Sweeten f68d07f080 staging: comedi: pcl730: add support for the PCL-725 ISA board
The PCL-725 ISA board can be supported by this driver. This board has
8 isolated digital inputs and 8 isolated digital outputs.

Add support for the PCL-725 board to the pcl730 driver and remove the
standalone pcl725 driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-08 21:56:58 -07:00
H Hartley Sweeten 145ff35bab staging: comedi: pcl730: add support for the PCM-3730 PC/104 board
The PCM-3730 PC/104 board has the same register i/o map as the PCL-730
ISA board. The only difference is the number of isolated digital input
and output channels.

Add support for the PCM-3770 board to the pcl730 driver and remove the
standalone pcm3730 driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-08 21:56:57 -07:00
H Hartley Sweeten 1471882ce2 staging: comedi: Kconfig: COMEDI_S526 is a PC/104 board not a PCI board
The Sensoray Model 526 board is a PC/104 style board not a PCI board.
Move it into the correct group in the Kconfig and Makefile.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-06-04 19:39:00 -07:00
Ian Abbott 4efc4bbdc1 staging: comedi: work without HAS_DMA
The core "comedi" module and the "mite" helper module for NI PCI devices
both have calls to `dma_alloc_coherent()` and `dma_free_coherent()`.
Those functions are only available if `CONFIG_HAS_DMA` is defined.

Apart from the "mite" module, the functions are only called for comedi
drivers that set `s->async_dma_dir` (where `s` is a pointer to a `struct
comedi_subdevice`) to anything other than `DMA_NONE`.

Change local helper functions `__comedi_buf_alloc()` and
`__comedi_buf_free()` to only call `dma_alloc_coherent()` and
`dma_free_coherent()` if `CONFIG_HAS_DMA` is defined.

Change the "Kconfig" to make the following configuration options depend
on `HAS_DMA`:

`COMEDI_MITE` - builds the "mite" module.
`COMEDI_NI_6527` - selects `COMEDI_MITE`.
`COMEDI_NI_65XX` - selects `COMEDI_MITE`.
`COMEDI_NI_670X` - selects `COMEDI_MITE`.
`COMEDI_NI_LABPC_PCI` - selects `COMEDI_MITE`.
`COMEDI_NI_PCIDIO` - selects `COMEDI_MITE`.
`COMEDI_NI_TIOCMD` - selects `COMEDI_MITE`.
`COMEDI_NI_660X` - selects `COMEDI_NI_TIOCMD`,
                   sets `s->async_dma_dir`.
`COMEDI_NI_PCIMIO` - selects `COMEDI_NI_TIOCMD`,
                     sets `s->async_dma_dir`.

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>
2013-05-13 17:38:46 -04:00
H Hartley Sweeten fa3cb21910 staging: comedi: ni_labpc: split out PCI support
Currently the ni_labpc driver is used by the legacy (ISA), PCI, and
PCMCIA versions of the LabPC board. The driver is enabled under the
COMEDI_PCI_DRIVERS section of the Kconfig. This means that PCI support
must be enabled in order to use the ni_labpc driver for the PCI or
PCMCIA drivers.

Split the PCI support code out of the ni_labpc driver into a separate
driver, ni_labpc_pci. The PCMCIA support is already slip out as
ni_labpc_cs.

Modify the Kconfig so that the common code in ni_labpc is enabled by the
Kconfig option COMEDI_NI_LABPC. The ISA support code is currently still
in the ni_labpc driver but is only compiled in if COMEDI_NI_LABPC_ISA is
also enabled.

This allows the PCI and PCMCIA drivers to be enabled without the need
for the ISA stuff.

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>
2013-04-23 10:36:27 -07:00
Ian Abbott 22691aec19 staging: comedi: amplc_pc263: split out PCI support
The "amplc_pc263" module is a hybrid driver for Amplicon PC263 (ISA) and
PCI263 (PCI) and uses conditional compilation (and compiler
optimization) to compile in the support for the different bus types.

Split out support for the PCI263 into a new module "amplc_pci263",
retaining support for the PC263 in the existing module "amplc_pc263".

Don't bother supporting the legacy attach mechanism for PCI board in the
new module as that is no longer in vogue for the comedi drivers and the
PCI263 board has no special configuration requirements.

Although the code to handle the single subdevice of each board is the
same for both drivers, this is only a small amount of code and I don't
think it's worth creating a common module to handle 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>
2013-04-12 15:12:42 -07:00
Ian Abbott 89f3e664eb staging: comedi: Kconfig: update CONFIG_AMPLC_DIO200_PCI help text
After splitting support for PCI cards out of the "amplc_dio200" module
into "amplc_dio200_pci", the help text needs updating.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-25 11:30:06 -07:00
Ian Abbott 8bdfefb784 staging: comedi: ni_660x: support NI PXI-6624
Florent Boudet reports success using a NI PXI-6624 board with a
trivially modified version of the "ni_660x" driver (addition to the PCI
device ID table and comedi board table).  He did this with the
out-of-tree Comedi drivers at www.comedi.org, but it applies equally to
the in-tree "staging" drivers.

He reports the PXI-6624 is basically the same as the PXI-6602, but with
isolated channels and external voltage source.

Add support for NI PXI-6224 to the "ni_660x" driver.

(Maybe the driver should be renamed to "ni_66xx"?)

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Florent Boudet <flboudet@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-15 09:12:25 -07:00
Frank Mori Hess f165d815d5 staging: comedi: adv_pci1724: new driver
New comedi driver for Advantech PCI-1724U with modifications by Ian
Abbott <abbotti@mev.co.uk>.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmh6jj@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-03-12 09:09:08 -07:00
H Hartley Sweeten f91f9beaa1 staging: comedi: das08: split out bus specific code
Split the bus specific ISA/PC-104 and PCI code out of this driver
and create two new drivers, das08_isa and das08_pci.

This allows removing all the #ifdef'ery in the das08 driver that
handled if the CONFIG_COMEDI_DAS08_{ISA,PCI} options were enabled.

It also makes the PCI driver cleanly Plug-and-Play since the comedi
driver only has an auto_attach callback. Previously it also had an
attach callback in order to handle the ISA cards.

Since the PCMCIA support was already split out, we can also remove
the now unused enum das08_bustype and it's use in the boardinfo.
The bus specific code deals with the bustype automatically before
it calls the common attach function in das08.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-02-03 17:33:08 -08:00
H Hartley Sweeten 309231d7a6 staging: comedi: conditionally build in PCMCIA driver support
Separate the comedi_pcmcia_* functions out of drivers.c into a new
source file, comedi_pcmcia.c. This allows conditionally building
support for comedi pcmcia drivers into the comedi core without the
need for the #if'defery. Fix the Kconfig and Makefile appropriately.

Group all the comedi_pcmcia_* prototypes into one place in comedidev.h.
Protect these prototypes with an #ifdef so that building a comedi
pcmcia driver without PCMCIA support will cause a build error. This
will normally not happen as long as the comedi pcmcia driver is placed
in the proper group in the Kconfig.

Remove the #include <pcmcia/*.h> from drivers.c. These includes are only
needed by the comedi pcmcia driver support code and the pcmcia drivers.
The include should occur in those files.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-31 10:38:10 +01:00
H Hartley Sweeten 33782dd5ed staging: comedi: conditionally build in PCI driver support
Separate the comedi_pci_* functions out of drivers.c into a new
source file, comedi_pci.c. This allows conditionally building
support for comedi PCI drivers into the comedi core. Fix the
Kconfig and Makefile appropriately.

Group all the comedi_pci_* prototypes and related defines into one
place in comedidev.h. Protect these prototypes with an #ifdef and
provide some dummy functions so that the mixed ISA/PCI comedi
drivers will still build correctly.

Remove the #include <linux/pci.h> from comedidev.h and drivers.c. This
include is only needed by the comedi PCI driver support code and the
PCI drivers. The include should occur in those files.

Also, remove the #include <linux/pci.h> from a couple non-PCI drivers
since it's not needed.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-31 10:38:10 +01:00
H Hartley Sweeten abac8b54a3 staging: comedi: conditionally build in USB driver support
Separate the comedi_usb_* functions out of drivers.c into a new
source file, comedi_usb.c. This allows conditionally building
support for comedi USB drivers into the comedi core without the
need for the #if'defery. Fix the Kconfig and Makefile appropriately.
For aesthetic reasons, add some whitespace to the Makefile to keep
everything lined up.

Group all the comedi_usb_* prototypes into one place in comedidev.h.
Protect these prototypes with an #ifdef so that building a comedi
usb driver without USB support will cause a build error. This will
normally not happen as long as the comedi USB driver is placed in
the proper group in the Kconfig.

Remove the #include<linux/usb.h> from comedidev.h and drivers.c. This
include is only needed by the comedi USB driver support code and the
USB drivers. The include should occur in those files.

Removing the include of usb.h exposed a couple drivers that need
<linux/interrupt.h> and <linux/sched.h>. Add the missing includes.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-31 10:35:48 +01:00
Geert Uytterhoeven 5ccac0fd59 staging: comedi: ISA DMA drivers should depend on ISA_DMA_API
m68k allmodconfig:

  CC [M]  drivers/staging/comedi/drivers/pcl812.o
drivers/staging/comedi/drivers/pcl812.c: In function ‘pcl812_ai_cmd’:
drivers/staging/comedi/drivers/pcl812.c:736: error: implicit declaration of function ‘set_dma_mode’
drivers/staging/comedi/drivers/pcl812.c:736: error: ‘DMA_MODE_READ’ undeclared (first use in this function)
drivers/staging/comedi/drivers/pcl812.c:736: error: (Each undeclared identifier is reported only once
drivers/staging/comedi/drivers/pcl812.c:736: error: for each function it appears in.)
drivers/staging/comedi/drivers/pcl812.c:737: error: implicit declaration of function ‘claim_dma_lock’
drivers/staging/comedi/drivers/pcl812.c:738: error: implicit declaration of function ‘clear_dma_ff’
drivers/staging/comedi/drivers/pcl812.c:739: error: implicit declaration of function ‘set_dma_addr’
drivers/staging/comedi/drivers/pcl812.c:740: error: implicit declaration of function ‘set_dma_count’
drivers/staging/comedi/drivers/pcl812.c:741: error: implicit declaration of function ‘release_dma_lock’
drivers/staging/comedi/drivers/pcl812.c:742: error: implicit declaration of function ‘enable_dma’
drivers/staging/comedi/drivers/pcl812.c: In function ‘interrupt_pcl812_ai_dma’:
drivers/staging/comedi/drivers/pcl812.c:883: error: implicit declaration of function ‘disable_dma’
drivers/staging/comedi/drivers/pcl812.c:884: error: ‘DMA_MODE_READ’ undeclared (first use in this function)
drivers/staging/comedi/drivers/pcl812.c: In function ‘pcl812_ai_poll’:
drivers/staging/comedi/drivers/pcl812.c:947: error: implicit declaration of function ‘get_dma_residue’
make[2]: *** [drivers/staging/comedi/drivers/pcl812.o] Error 1
  CC [M]  drivers/staging/comedi/drivers/pcl816.o
drivers/staging/comedi/drivers/pcl816.c: In function ‘interrupt_pcl816_ai_mode13_dma’:
drivers/staging/comedi/drivers/pcl816.c:359: error: implicit declaration of function ‘disable_dma’
drivers/staging/comedi/drivers/pcl816.c:366: error: implicit declaration of function ‘set_dma_mode’
drivers/staging/comedi/drivers/pcl816.c:366: error: ‘DMA_MODE_READ’ undeclared (first use in this function)
drivers/staging/comedi/drivers/pcl816.c:366: error: (Each undeclared identifier is reported only once
drivers/staging/comedi/drivers/pcl816.c:366: error: for each function it appears in.)
drivers/staging/comedi/drivers/pcl816.c:367: error: implicit declaration of function ‘claim_dma_lock’
drivers/staging/comedi/drivers/pcl816.c:369: error: implicit declaration of function ‘set_dma_addr’
drivers/staging/comedi/drivers/pcl816.c:372: error: implicit declaration of function ‘set_dma_count’
drivers/staging/comedi/drivers/pcl816.c:378: error: implicit declaration of function ‘release_dma_lock’
drivers/staging/comedi/drivers/pcl816.c:379: error: implicit declaration of function ‘enable_dma’
drivers/staging/comedi/drivers/pcl816.c: In function ‘pcl816_ai_cmd’:
drivers/staging/comedi/drivers/pcl816.c:629: error: ‘DMA_MODE_READ’ undeclared (first use in this function)
drivers/staging/comedi/drivers/pcl816.c:631: error: implicit declaration of function ‘clear_dma_ff’
drivers/staging/comedi/drivers/pcl816.c: In function ‘pcl816_ai_poll’:
drivers/staging/comedi/drivers/pcl816.c:679: error: implicit declaration of function ‘get_dma_residue’
make[2]: *** [drivers/staging/comedi/drivers/pcl816.o] Error 1
  CC [M]  drivers/staging/comedi/drivers/pcl818.o
drivers/staging/comedi/drivers/pcl818.c: In function ‘interrupt_pcl818_ai_mode13_dma’:
drivers/staging/comedi/drivers/pcl818.c:547: error: implicit declaration of function ‘disable_dma’
drivers/staging/comedi/drivers/pcl818.c:550: error: implicit declaration of function ‘set_dma_mode’
drivers/staging/comedi/drivers/pcl818.c:550: error: ‘DMA_MODE_READ’ undeclared (first use in this function)
drivers/staging/comedi/drivers/pcl818.c:550: error: (Each undeclared identifier is reported only once
drivers/staging/comedi/drivers/pcl818.c:550: error: for each function it appears in.)
drivers/staging/comedi/drivers/pcl818.c:551: error: implicit declaration of function ‘claim_dma_lock’
drivers/staging/comedi/drivers/pcl818.c:552: error: implicit declaration of function ‘set_dma_addr’
drivers/staging/comedi/drivers/pcl818.c:555: error: implicit declaration of function ‘set_dma_count’
drivers/staging/comedi/drivers/pcl818.c:561: error: implicit declaration of function ‘release_dma_lock’
drivers/staging/comedi/drivers/pcl818.c:562: error: implicit declaration of function ‘enable_dma’
drivers/staging/comedi/drivers/pcl818.c: In function ‘pcl818_ai_mode13dma_int’:
drivers/staging/comedi/drivers/pcl818.c:886: error: ‘DMA_MODE_READ’ undeclared (first use in this function)
drivers/staging/comedi/drivers/pcl818.c:888: error: implicit declaration of function ‘clear_dma_ff’
make[2]: *** [drivers/staging/comedi/drivers/pcl818.o] Error 1
  CC [M]  drivers/staging/comedi/drivers/das16.o
drivers/staging/comedi/drivers/das16.c: In function ‘das16_cmd_exec’:
drivers/staging/comedi/drivers/das16.c:644: error: implicit declaration of function ‘claim_dma_lock’
drivers/staging/comedi/drivers/das16.c:645: error: implicit declaration of function ‘disable_dma’
drivers/staging/comedi/drivers/das16.c:648: error: implicit declaration of function ‘clear_dma_ff’
drivers/staging/comedi/drivers/das16.c:650: error: implicit declaration of function ‘set_dma_addr’
drivers/staging/comedi/drivers/das16.c:654: error: implicit declaration of function ‘set_dma_count’
drivers/staging/comedi/drivers/das16.c:655: error: implicit declaration of function ‘enable_dma’
drivers/staging/comedi/drivers/das16.c:656: error: implicit declaration of function ‘release_dma_lock’
drivers/staging/comedi/drivers/das16.c: In function ‘disable_dma_on_even’:
drivers/staging/comedi/drivers/das16.c:845: error: implicit declaration of function ‘get_dma_residue’
drivers/staging/comedi/drivers/das16.c: In function ‘das16_attach’:
drivers/staging/comedi/drivers/das16.c:1197: error: implicit declaration of function ‘set_dma_mode’
drivers/staging/comedi/drivers/das16.c:1197: error: ‘DMA_MODE_READ’ undeclared (first use in this function)
drivers/staging/comedi/drivers/das16.c:1197: error: (Each undeclared identifier is reported only once
drivers/staging/comedi/drivers/das16.c:1197: error: for each function it appears in.)
make[2]: *** [drivers/staging/comedi/drivers/das16.o] Error 1
  CC [M]  drivers/staging/comedi/drivers/das1800.o
drivers/staging/comedi/drivers/das1800.c: In function ‘das1800_flush_dma_channel’:
drivers/staging/comedi/drivers/das1800.c:555: error: implicit declaration of function ‘disable_dma’
drivers/staging/comedi/drivers/das1800.c:559: error: implicit declaration of function ‘clear_dma_ff’
drivers/staging/comedi/drivers/das1800.c:562: error: implicit declaration of function ‘get_dma_residue’
drivers/staging/comedi/drivers/das1800.c: In function ‘das1800_flush_dma’:
drivers/staging/comedi/drivers/das1800.c:586: error: implicit declaration of function ‘claim_dma_lock’
drivers/staging/comedi/drivers/das1800.c:603: error: implicit declaration of function ‘release_dma_lock’
drivers/staging/comedi/drivers/das1800.c: In function ‘das1800_handle_dma’:
drivers/staging/comedi/drivers/das1800.c:622: error: implicit declaration of function ‘set_dma_addr’
drivers/staging/comedi/drivers/das1800.c:624: error: implicit declaration of function ‘set_dma_count’
drivers/staging/comedi/drivers/das1800.c:625: error: implicit declaration of function ‘enable_dma’
drivers/staging/comedi/drivers/das1800.c: In function ‘das1800_init_dma’:
drivers/staging/comedi/drivers/das1800.c:1424: error: implicit declaration of function ‘set_dma_mode’
drivers/staging/comedi/drivers/das1800.c:1424: error: ‘DMA_MODE_READ’ undeclared (first use in this function)
drivers/staging/comedi/drivers/das1800.c:1424: error: (Each undeclared identifier is reported only once
drivers/staging/comedi/drivers/das1800.c:1424: error: for each function it appears in.)
make[2]: *** [drivers/staging/comedi/drivers/das1800.o] Error 1
  CC [M]  drivers/staging/comedi/drivers/dt282x.o
drivers/staging/comedi/drivers/dt282x.c: In function ‘dt282x_ao_dma_interrupt’:
drivers/staging/comedi/drivers/dt282x.c:328: error: implicit declaration of function ‘disable_dma’
drivers/staging/comedi/drivers/dt282x.c: In function ‘prep_ai_dma’:
drivers/staging/comedi/drivers/dt282x.c:416: error: implicit declaration of function ‘set_dma_mode’
drivers/staging/comedi/drivers/dt282x.c:416: error: ‘DMA_MODE_READ’ undeclared (first use in this function)
drivers/staging/comedi/drivers/dt282x.c:416: error: (Each undeclared identifier is reported only once
drivers/staging/comedi/drivers/dt282x.c:416: error: for each function it appears in.)
drivers/staging/comedi/drivers/dt282x.c:417: error: implicit declaration of function ‘claim_dma_lock’
drivers/staging/comedi/drivers/dt282x.c:418: error: implicit declaration of function ‘clear_dma_ff’
drivers/staging/comedi/drivers/dt282x.c:419: error: implicit declaration of function ‘set_dma_addr’
drivers/staging/comedi/drivers/dt282x.c:420: error: implicit declaration of function ‘set_dma_count’
drivers/staging/comedi/drivers/dt282x.c:421: error: implicit declaration of function ‘release_dma_lock’
drivers/staging/comedi/drivers/dt282x.c:423: error: implicit declaration of function ‘enable_dma’
drivers/staging/comedi/drivers/dt282x.c: In function ‘prep_ao_dma’:
drivers/staging/comedi/drivers/dt282x.c:439: error: ‘DMA_MODE_WRITE’ undeclared (first use in this function)
drivers/staging/comedi/drivers/dt282x.c: In function ‘dt282x_interrupt’:
drivers/staging/comedi/drivers/dt282x.c:471: error: ‘DMA_MODE_READ’ undeclared (first use in this function)
drivers/staging/comedi/drivers/dt282x.c: In function ‘dt282x_ai_cmd’:
drivers/staging/comedi/drivers/dt282x.c:690: error: ‘DMA_MODE_READ’ undeclared (first use in this function)
drivers/staging/comedi/drivers/dt282x.c: In function ‘dt282x_ao_cmd’:
drivers/staging/comedi/drivers/dt282x.c:938: error: ‘DMA_MODE_WRITE’ undeclared (first use in this function)
make[2]: *** [drivers/staging/comedi/drivers/dt282x.o] Error 1
  CC [M]  drivers/staging/comedi/drivers/ni_at_a2150.o
drivers/staging/comedi/drivers/ni_at_a2150.c: In function ‘a2150_interrupt’:
drivers/staging/comedi/drivers/ni_at_a2150.c:237: error: implicit declaration of function ‘claim_dma_lock’
drivers/staging/comedi/drivers/ni_at_a2150.c:238: error: implicit declaration of function ‘disable_dma’
drivers/staging/comedi/drivers/ni_at_a2150.c:241: error: implicit declaration of function ‘clear_dma_ff’
drivers/staging/comedi/drivers/ni_at_a2150.c:249: error: implicit declaration of function ‘get_dma_residue’
drivers/staging/comedi/drivers/ni_at_a2150.c:286: error: implicit declaration of function ‘set_dma_addr’
drivers/staging/comedi/drivers/ni_at_a2150.c:287: error: implicit declaration of function ‘set_dma_count’
drivers/staging/comedi/drivers/ni_at_a2150.c:288: error: implicit declaration of function ‘enable_dma’
drivers/staging/comedi/drivers/ni_at_a2150.c:290: error: implicit declaration of function ‘release_dma_lock’
drivers/staging/comedi/drivers/ni_at_a2150.c: In function ‘a2150_attach’:
drivers/staging/comedi/drivers/ni_at_a2150.c:794: error: implicit declaration of function ‘set_dma_mode’
drivers/staging/comedi/drivers/ni_at_a2150.c:794: error: ‘DMA_MODE_READ’ undeclared (first use in this function)
drivers/staging/comedi/drivers/ni_at_a2150.c:794: error: (Each undeclared identifier is reported only once
drivers/staging/comedi/drivers/ni_at_a2150.c:794: error: for each function it appears in.)
make[2]: *** [drivers/staging/comedi/drivers/ni_at_a2150.o] Error 1

Make PCL816, PCL818, DAS16, DAS1800, DT282X, and NI_AT_A2150 depend on
ISA_DMA_API to fix this.

Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-30 18:16:54 +01:00
H Hartley Sweeten 1445ea1545 staging: comedi: addi_apci_1516: use addi_watchdog module
Use the addi_watchdog module to provide support for the watchdog
subdevice.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-25 12:15:53 -08:00
H Hartley Sweeten 26b3989946 staging: comedi: addi_apci_2200: change the MODULE_DESCRIPTION
Change the MODULE_DESCRIPTION to something more useful than the
generic "Comedi low-level driver" so that modinfo provides a
better description of the driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21 16:03:02 -08:00
Greg Kroah-Hartman 35be842538 Staging: comedi: enable it to build on all arches
Hopefully all of the arch-specific problems are now resolved, so let's
let this subsystem be enabled on all arches.  If there are problems
found, we will fix them up.

Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: H Hartley Sweeten <hartleys@visionengravers.com>
Cc: Bernd Porr <mail@berndporr.me.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21 14:19:45 -08:00
Ian Abbott 3eb4fd1f56 staging: comedi: Allow comedi on ARM
Bernd Porr reports success getting comedi to work on ARM.  He writes:

"""
comedi works nicely on the Raspberry PI. I've compiled the rpi kernel
with comedi enabled and it works with the USBDUX-sigma (need to test the
other boards). With comedirecord running I can plot one channel at 1kHz
without buffer overflow (resulting to 70% load).

So, I guess we just need to add "ARM" to Kconfig in the comedi subdir?

         depends on BROKEN || FRV || M32R || MN10300 || SUPERH || TILE || X86 || ARM

I'm running just now 3.2.27 but also the development kernel compiles
with ARM enabled (haven't tested yet).

/Bernd
"""

Enable the COMEDI config option to be selected for ARM.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Bernd Porr <mail@berndporr.me.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-21 14:17:16 -08:00
H Hartley Sweeten 5b62fe2a03 staging: comedi: addi_apci_2032: use addi_watchdog module
Use the addi_watchdog module to provide support for the watchdog
subdevice.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-18 12:52:54 -08:00
H Hartley Sweeten 2abcf87aee staging: comedi: introduce addi_watchdog driver
Many of the ADDI-DATA drivers have a "watchdog" subdevice that can
be used to monitor digital output activity. All the digital outputs
are released (set to 0) if the digital outputs are not accessed, or
the watchdog it not pinged, before the timeout of the watchdog
occurs. The only difference in the drivers for the watchdog subdevice
is the base address used to talk to the watchdog registers.

Instead of duplicating the code needed to support this watchdog,
introduce a helper module, similar to the 8255 module. This module
will be select'ed by the drivers that can use it.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-18 12:52:54 -08:00
Ian Abbott 34ffb33e09 staging: comedi: Kconfig: COMEDI_NI_AT_A2150 should select COMEDI_FC
The 'ni_at_a2150' module links to `cfc_write_to_buffer` in the
'comedi_fc' module, so selecting 'COMEDI_NI_AT_A2150' in the kernel config
needs to also select 'COMEDI_FC'.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: stable <stable@vger.kernel.org> # 3.6+
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-01-07 14:48:24 -08:00
H Hartley Sweeten 1f168dbdf7 staging: comedi: Kconfig: remove VIRT_TO_BUS depends on
The only addi-data driver that uses virt_to_bus is addi_apci_3120.
Remove the depends on for the other addi-data drivers.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 15:33:54 -08:00
H Hartley Sweeten 98071b6773 staging: comedi: addi_apci_1516: update the Kconfig
This driver does not use virt_to_bus(), remove the depends on for it.

Update the Kconfig entry to list all the boards supported by this
driver. Also, expand the help text a bit.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 15:12:56 -08:00
H Hartley Sweeten 2a366e7b9d staging: comedi: addi_apci_1516: merge in addi_apci_2016 driver
The low-level hardware support code for these drivers, hwdrv_apci1516.c
and hwdrv_apci2016.c, is identical. Both of these boards are 16 channel
dio boards. The 1516 board has 8 input/8 output channels and the 2016
has 16 output channels.

To ease maintainability, merge the boardinfo and pci device information
from the addi_apci_2016 driver into the addi_apci_1516 driver and modify
the Kconfig and Makefile appropriately.

This allows deleting the addi_apci_2016.c and hwdrv_apci2016.c files.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13 15:12:45 -08:00
H Hartley Sweeten 973781a821 staging: comedi: addi_apci_3120: merge in addi_apci_3001 driver
The addi_apci_3120 and addi_apci_3001 drivers share the same low-level
board support code (hwdrv_apci3120). Merge the boardinfo and PCI_DEVICE
information from the addi_apci_3001 driver into the addi_apci_3120
driver and delete then delete the addi_apci_3001 driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-02 11:23:47 -07:00
Ian Abbott 23249ea230 staging: comedi: Kconfig: update COMEDI_AMPLC_DIO200_PCI option
Update the prompt line and description for the COMEDI_AMPLC_DIO200_PCI
config option to add the new PCIe boards supported by the "amplc_dio200"
driver.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-24 15:25:23 -07:00
Ian Abbott 2662a9b626 staging: comedi: amplc_dio200: don't select COMEDI_8255
The "amplc_dio200" module no longer depends on the "8255" module, so the
'COMEDI_AMPLC_DIO200' Kconfig setting no longer needs to select
'COMEDI_8255'.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-24 15:25:12 -07:00
H Hartley Sweeten b37c1aeed8 staging: comedi: 8255_pci: move ni_pcidio 8255 board support
The 8255 based boards in the ni_pcidio driver are all simple
memory mapped 8255 boards that don't require the dma support
provided by the mite driver.

Move the support for these boards from the ni_pcidio driver to
the generic 8255_pci driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:13:03 -07:00
H Hartley Sweeten 606b04707e staging: comedi: 8255_pci: add support for the PCI-DIO96H board
Add support for the Measurement Computing PCI-DIO96H board to the
generic 8255_pci driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:11:14 -07:00
H Hartley Sweeten df1a3f8796 staging: comedi: remove cb_pcidio driver
Move the support for the boards in the cb_pcidio driver to
the generic 8255_pci driver and remove the cb_pcidio driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:11:14 -07:00
H Hartley Sweeten 41518de2e1 staging: comedi: rename adl_pci7296 driver
This driver will be used for all generic PCI based 8255 digital
i/o boards. Rename the driver accordingly..

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-09-13 20:11:13 -07:00
H Hartley Sweeten 32bb154480 staging: comedi: update adl_pci7296 driver
Currently this driver only supports the 96-channel PCI-7296.
The 24 and 48 channel PCI-7224 and PCI-7248 boards share the
same register map and just have less 8255 devices providing
the i/o channels.

This adds the PCI PnP support for the other boards in the
ADLink PCI-72xx series.

Also, remove the legacy attach using the comedi_config utility.
This driver now supports the comedi PCI auto config attach
mechanism and the legacy attach is not supported or required
by this driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-13 18:30:23 -07:00
H Hartley Sweeten 657f77d173 staging: comedi: remove adl_pci7230 and adl_pci7432 drivers
The boards supported by these drivers are now handled by the
adl_pci7x3x driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-13 18:23:28 -07:00
H Hartley Sweeten 8f567c373c staging: comedi: new adl_pci7x3x driver
Currently the ADLink PCI-7230 and PCI-7432 Isolated Digital
I/O Boards are supported using two drivers (adl_pci7230 and
adl_pci7432). These drivers are very similar and only differ
in the total number of di/do channels provided.

This driver combines the support for both boards into one
common driver. In addition, it adds PCI PnP support for the
other boards in the ADLink PCI-723x and PCI-743x series.

This driver only supports the comedi PCI auto config attach
mechanism. The legacy attach using the comedi_config utility
is not supported or required by this driver.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-08-13 18:23:28 -07:00
Ian Abbott a77198816e staging: comedi: Move COMEDI_MITE and COMEDI_NI_TIOCMD
Move the CONFIG_COMEDI_MITE config options into the `if
COMEDI_PCI_DRIVERS` block so that the `depends on PCI` condition can be
omitted.  Move the CONFIG_COMEDI_NI_TIOCMD config option to the same
block as it selects COMEDI_MITE.  Move the CONFIG_COEMDI_NI_TIO config
option slightly for aesthetic reasons without changing its conditions.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-26 15:10:57 -07:00
Ian Abbott 7ac21b82be staging: comedi: Simplify NI driver configuration
At the moment, the options to select drivers for various National
Instruments boards in the "Comedi PCI drivers", "Comedi ISA and PC/104
drivers" and "Comedi PCMCIA drivers" menus do not appear unless you
first enable and enter the "Comedi National Instruments card support"
menu and possibly select some of the options in there.  This is pretty
confusing for the user.

Get rid of the "Comedi National Instruments card support" menu
(CONFIG_COMEDI_NI_COMMON) and make the CONFIG_COMEDI_MITE,
CONFIG_COMEDI_NI_TIO and CONFIG_COMEDI_NI_TIOCMD options selectable by
other options instead of dependencies of those other options.

We lose the ability to build the 'mite', 'ni_tio' and 'ni_tiocmd'
modules independently of other modules, but they are not useful on their
own anyway.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-26 15:10:57 -07:00
Ian Abbott 2f2ac8ec08 staging: comedi: Move COMEDI_NI_LABPC config option
Move the CONFIG_COMEDI_NI_LABPC option ("NI Lab-PC and compatibles ISA
and PCI support") from the CONFIG_COMEDI_NI_COMMON menu ("Comedi
National Instruments card support  --->") to the
CONFIG_COMEDI_PCI_DRIVERS menu ("Comedi PCI drivers  --->").

It currently depends on PCI but should be split up into separate ISA and
PCI config options eventually as was done for the "das08" driver.  For
now, the PCI card menu seems the best place for it and I plan to get rid
of the CONFIG_COMEDI_NI_COMMON menu altogether.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-26 15:10:57 -07:00
Ian Abbott ea8d385436 staging: comedi: split CONFIG_COMEDI_NI_TIO option
Selecting the CONFIG_COMEDI_NI_TIO config option causes the 'ni_tio' and
'ni_tiocmd' modules to be built. CONFIG_COMEDI_NI_TIO depends on
CONFIG_COMEDI_MITE which in turn depends on CONFIG_PCI.  However, not
all the drivers that need the 'ni_tio' module also need the 'ni_tiocmd'
module.  Specifically, the ISA and PCMCIA drivers do not need the
'ni_tiocmd' module.

Add a new config option CONFIG_COMEDI_NI_TIOCMD to control building of
the 'ni_tiocmd' module.  It depends on CONFIG_COMEDI_NI_TIO and
CONFIG_COMEDI_MITE.  The existing CONFIG_COMEDI_NI_TIO option no longer
needs to depend on CONFIG_COMEDI_MITE.

Make CONFIG_COMEDI_NI_660X ('ni_660x' module) and
CONFIG_COMEDI_NI_PCIMIO ('ni_pcimio' module) depend on
CONFIG_COMEDI_NI_TIOCMD instead of CONFIG_COMEDI_NI_TIO.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-26 15:10:56 -07:00
H Hartley Sweeten 9c3db14239 staging: comedi: Kconfig: remove redundant depends on tests
The 'depends on COMEDI_ISA_DRIVERS' for COMEDI_AMPLC_DIO200_ISA is
not needed. This option is alread in an if/endif block that will
satisy the check.

The 'depends on COMEDI' for COMEDI_NI_COMMON was missed when all
the comedi options were wrapped in an if/endif block.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-20 13:02:49 -07:00
H Hartley Sweeten 64be096d0f staging: comedi: Kconfig: menuconfig options should be bool
The menuconfig options to enable the various comedi driver types
should be bool not tristate. They don't directly affect the
building of the kernel, they just allow other options to be
selected.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-20 13:01:47 -07:00
H Hartley Sweeten a3b0eee21b staging: comedi: Kconfig: fix drivers that require the 8255 driver
Many of the comedi drivers require the 8255 driver for
various subdevice support. The Makefile currently uses
CONFIG_COMEDI_PCI_DRIVERS to make sure the 8255 driver
is compiled. The Kconfig help for that option says that
it does not directly affect the kernel.

Fix this by adding 'select COMEDI_8255' to the drivers
that actually need the support.

Also, remove two cases where the drivers don't require
the 8255 support.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-20 12:59:12 -07:00
H Hartley Sweeten dc348147a9 staging: comedi: fix Kconfig for COMEDI_PCMCIA_DRIVERS
The depends on PCCARD is redundant. All of the comedi PCMCIA
drivers depend on PCMCIA which can only be enabled if PCCARD
is enabled. Remove the extra depends check.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Tested-by: Ian Abbott <abbotti@mev.co.uk>
Reported-by: Randy Dunlap <rdunlap@xenotime.net>
Acked-by: Randy Dunlap <rdunlap@xenotime.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-15 14:46:49 -07:00
H Hartley Sweeten 4829a9967d staging: comedi: Kconfig: cleanup depends on logic
All of the config options for comedi depend on COMEDI being
selected. Wrap everything in an 'if COMEDI/endif' block and
remove all the individual 'depends on COMEDI' in the Kconfig.

Also, remove the redundant && ISA/PCI/PCMCIA/USB for the if
blocks with those driver types.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbott@mev.co.uk>
Cc: Frank Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-13 12:20:16 -07:00
H Hartley Sweeten 5b28e55eb1 staging: comedi: Make COMEDI_FC a hidden Kconfig option
The COMEDI_FC Kconfig option is selected by the relevant drivers
when needed. Since it only contains shared functions, selecting
it manually serves no purpose. Just make it a hidden selection.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-06-04 20:46:07 -07:00
H Hartley Sweeten e3f7e1a5b1 staging: comedi: remove all 'default N' in Kconfig
Remove all the 'default N' lines in the comedi Kconfig. They should all
be 'default n' but that is the default anyway.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Cc: Mori Hess <fmhess@users.sourceforge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-05-18 17:15:47 -07:00
Ian Abbott 234bb3c60f staging: comedi: Add kernel config for default buffer sizes
Allow the default values for the module parameters for the default
initial buffer size and default maximum buffer size to be specified in
the kernel configuration.

I'm not sure what the defaults for the defaults for the defaults should
be, but 64 KiB seems to small, so I used values suggested by Bernd Porr,
which are 2048 KiB for the default initial buffer size and 20480 for the
default maximum buffer size.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Bernd Porr <berndporr@f2s.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-13 11:18:23 -07:00
Ian Abbott 2e3c024df1 staging: comedi: das08: separately configure ISA and PCI
The das08 driver supports both ISA and PCI cards, but currently is
configured outside the ISA and PCI comedi driver sections.  The module
is also used by the das08_cs driver.  This patch splits the
configuration to make the ISA and PCI parts separately selectable, and
changes the driver to only include the selected ISA and/or PCI board
types.  Also, if neither the ISA or PCI parts are selected, and the
module is only needed for the das08_cs driver, don't register the driver
as a comedi driver as it doesn't have any boards to support.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10 11:16:13 -07:00
Ian Abbott 3e6be97ebb staging: comedi: amplc_pc263: separately configure ISA and PCI
The amplc_pc263 driver supports both ISA and PCI cards, but currently
it is only possible to select the driver if PCI is configured.  This
patch splits the configuration to make the ISA and PCI parts seperately
selectable, and changes the driver to only include the selected ISA
and/or PCI board types.

Also fix a conditionally mismatched brace in pc263_detach().

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10 11:16:13 -07:00