Commit Graph

63 Commits (93e562141ac58452bcea48718af92cc62a20669d)

Author SHA1 Message Date
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
Ian Abbott 717ab674e2 staging: comedi: amplc_pc236: separately configure ISA and PCI
The amplc_pc236 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.

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 8c287d2053 staging: comedi: amplc_dio200: separately configure ISA and PCI
The amplc_dio200 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.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-04-10 11:16:12 -07:00
Ian Abbott 9e77e6b62e staging: comedi: adv_pci_dio: Advantech PCI-1739U support
This patch is ported over by me (Ian Abbott) from the out-of-tree Comedi
git repository at "git://comedi.org/git/comedi/comedi.git".

The original patch is by Nicholas Nell.

-----
Advantech PCI-1739U support

Hello,

I've added a bit of simple configuration to adv_pci_dio.c in order to
make the PCI-1739U work with the adv_pci_dio driver. I have tested
inputs only so far but they seem to work. A git style patch is
attached.

Thanks,

--
Nicholas Nell
Professional Research Assistant
University of Colorado
-----

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Nico Nell <nicholas.nell@colorado.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-02-09 09:59:40 -08:00
Bernd Porr dd89e20d7e staging: comedi: new driver usbduxsigma
This adds a new driver file usbduxsigma which is the driver for
a new board by ITL. The driver has been tested and is working fine.

Signed-off-by: Bernd Porr <berndporr@f2s.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-08-23 12:00:45 -07:00
Prashant P. Shah 880e96166c Staging: comedi: add dyna_pci10xx driver to Makefile
Add dyna_pci10xx entry to comedi Kconfig and Makefile

Signed-off-by: Prashant P. Shah <pshah.mumbai@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-07-05 09:24:18 -07:00
Greg Kroah-Hartman a73738e9f8 Staging: comedi: fix build breakages on some platforms
Some platforms do not have virt_to_bus(), so properly depend on
CONFIG_VIRT_TO_BUS for the Comedi drivers that need this function.

Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-27 14:43:34 -07:00
Ralf Baechle 6fab3e1fbc Staging: Comedi: Build only on arches providing PAGE_KERNEL_NOCACHE
On architectures that don't define PAGE_KERNEL_NOCACHE, the Comedi driver turns
into tragedy:

  CC [M]  drivers/staging/comedi/drivers.o
drivers/staging/comedi/drivers.c: In function ‘comedi_buf_alloc’:
drivers/staging/comedi/drivers.c:505:41: error: ‘PAGE_KERNEL_NOCACHE’ undeclared (first use in this function)
drivers/staging/comedi/drivers.c:505:41: note: each undeclared identifier is rep orted only once for each function it appears in
make[3]: *** [drivers/staging/comedi/drivers.o] Error 1

Restrict the driver to only those architectures that define PAGE_KERNEL_NOCACHE.

PAGE_KERNEL_NOCACHE is a kludge - some system architectures such as SGI IP27
are even uable to offer uncached operation - at least in the way an unwitting
driver might assume.  I haven't looked in details how the driver is using
the area vmaped with PAGE_KERNEL_NOCACHE but maybe doing it XFS-style using
cached memory and the flush_kernel_vmap_range / invalidate_kernel_vmap_range
APIs in conjunction with the DMA API is a practical alternative.

Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Reported-by: David Miller <davem@davemloft.net>
Reported-by: Stephen Rothwell <sfr@canb.auug.org.au>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Cc: Martyn Welch <martyn.welch@ge.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-06-27 14:19:20 -07:00
Ian Abbott 0742cecbd4 Staging: Comedi: Fix a few NI module dependencies
The ni_tio and ni_tio modules do not depend on the 8255 module, but the
ni_atmio, ni_mio_cs and ni_pcimio modules do need the 8255 module.  The
ni_pcimio module also needs the comedi_fc module.

Signed-off-by: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-02-09 11:39:50 -08:00
Alexander Kurz 7f00b36e9e Staging: comedi: fixing ni_labpc to mite dependancy
the dependancy of ni_labpc on mite was missing,

Signed-off-by: Alexander Kurz <linux@kbdbabel.org>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>

index 0aa2b0d..79f5f2e 100644
2010-06-04 13:38:57 -07:00
Alexander Kurz 34ef545aa8 Staging: comedi: fixing ni_tio to mite PCI dependancy
On Wed, 19 May 2010, Randy Dunlap wrote:
> linux-next of 2010-0519:
> when CONFIG_PCI is not enabled:
> 
> drivers/staging/comedi/drivers/mite.c: In function 'mite_init':
> drivers/staging/comedi/drivers/mite.c:89: error: implicit declaration of function 'pci_dev_get'
> drivers/staging/comedi/drivers/mite.c:89: warning: assignment makes pointer from integer without a cast
> make[5]: *** [drivers/staging/comedi/drivers/mite.o] Error 1

This patch fixes the problem.

Signed-off-by: Alexander Kurz <linux@kbdbabel.org>
Acked-by: Randy Dunlap <randy.dunlap@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-04 13:38:54 -07:00
Alexander Kurz 824196248c Staging: comedi: fix 8255 and DAS08 Kconfig dependancies.
Both drivers support directly or indirectly multiple bus types,
hence both are listed independent of bus types.

Signed-off-by: Alexander Kurz <linux@kbdbabel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2010-06-04 13:38:54 -07:00