aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/drivers/addi_apci_3200.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2014-10-29staging: comedi: addi_apci_3200: remove driverH Hartley Sweeten1-125/+0
This driver has some serious bitrot. In addition, it's not in the Kconfig or Makefile so it can't even be built. Just remove it. It would be easier to rewrite the driver than fix it. 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-18staging: comedi: addi_common.h: remove ADDIDATA_* definesH Hartley Sweeten1-4/+4
These defines don't add any additional clarity to the addi_data drivers. Just remove them. 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-17Staging: comedi: addi-data: Fix long CamelCase function namesFred Akers1-18/+18
This patch fixes a few function names that are very long and are not in the correct naming style Signed-off-by: Fred Akers <knivey@botops.net> Reviewed-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-12-02staging: remove DEFINE_PCI_DEVICE_TABLE macroJingoo Han1-1/+1
Don't use DEFINE_PCI_DEVICE_TABLE macro, because this macro is not preferred. Signed-off-by: Jingoo Han <jg1.han@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013-07-23staging: comedi: don't rely on comedidev.h to include headersH Hartley Sweeten1-0/+1
comedidev.h is the main kernel header for comedi. Every comedi driver includes this header which then includes a number of <linux/*> headers. All the drivers need <linux/module.h> and some of them need <linux/delay.h>. The rest are not needed by any of the drivers. Remove all the includes in comedidev.h except for <linux/dma-mapping.h>, which is needed to pick up the enum dma_data_direction for the comedi_subdevice definition, and "comedi.h", which is the uapi header for comedi. Add <linux/module.h> to all the comedi drivers and <linux/delay.h> to the couple that need 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-04-11staging: comedi: addi_common: remove i_IorangeBase0 from boardinfoH Hartley Sweeten1-2/+0
The i_IorangeBase0 boardinfo is not used. Remove it. 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-11staging: comedi: addi_common: remove i_IorangeBase2 from boardinfoH Hartley Sweeten1-2/+0
The i_IorangeBase2 boardinfo is not used. Remove it. 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-11staging: comedi: addi_common: remove i_IorangeBase3 from boardinfoH Hartley Sweeten1-2/+0
When it is used, the entire PCI bar is ioremap'ed with pci_ioremap_bar(). The i_IorangeBase3 boardinfo is no longer needed. 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-03-11staging: comedi: addi_common: remove 'i_VendorId' and 'i_Device Id'H Hartley Sweeten1-4/+0
The vendor/device ids in the boardinfo are not longer needed. Remove them. 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-03-11staging: comedi: addi_apci_3200: use the pci id_table 'driver_data'H Hartley Sweeten1-12/+29
Create an enum to the boardinfo and pass that enum in the pci_driver id_table as the driver_data. Change the macro used to fill in the device table from PCI_DEVICE() to PCI_VDEVICE(). This allows passing the enum as the next field. Set the dev->board_ptr before calling addi_auto_attach(). This removes the need for the common code to search for the boardinfo. Since the search is not done we can remove the unnecessary board information from the comedi_driver. For aesthetic reasons, move the pci device table near the 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>
2013-03-11staging: comedi: comedi_pci: change the comedi_pci_auto_config() 'context'H Hartley Sweeten1-2/+2
The comedi_pci_auto_config() function is used to allow the PCI driver (*probe) function to automatically call the comedi driver (*auto_attach). This allows the comedi driver to be part of the PnP process when the PCI device is detected. Currently the comedi_pci_auto_config() always passes a 'context' of '0' to comedi_auto_config(). This makes the 'context' a bit useless. Modify comedi_pci_auto_config() to allow the comedi pci drivers to pass a 'context' from the PCI driver. Make all the comedi pci drivers pass the pci_device_id 'driver_data' as the 'context'. Since none of the comedi pci drivers currently set the 'driver_data' the 'context' will still be '0'. 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-31staging: comedi: conditionally build in PCI driver supportH Hartley Sweeten1-0/+2
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-25staging/comedi: Use comedi_pci_auto_unconfig directly for pci_driver.removePeter Huewe1-6/+1
(Almost) all comedi pci drivers have some wrapper for their pci_driver.remove function which simply calls comedi_pci_auto_unconfig which has the same function prototype as the wrapper. -> we can remove these wrappers and call comedi_pci_auto_unconfig directly. This removes a lot some boilerplate code and saves some bytes. Signed-off-by: Peter Huewe <peterhuewe@gmx.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21staging: comedi: remove use of __devexitBill Pemberton1-1/+1
CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21staging: comedi: remove use of __devinitBill Pemberton1-1/+1
CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-21staging: comedi: remove use of __devexit_pBill Pemberton1-1/+1
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-11-13staging: comedi: addi-data: use auto_attach instead of attach_pciH Hartley Sweeten1-1/+1
Change the addi-data drivers that use the "common" code so they attach using the generic 'auto_attach' method instead the pci specific 'attach_pci' method. The 'attach_pci' is deprecated and is going to be removed. 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-13staging: comedi: addi_apci_3200: remove i_APCI3200_ConfigDigitalOutput()H Hartley Sweeten1-2/+0
The digital outputs of the board supported by this driver are not configurable. This driver abuses the comedi API and uses the 'insn_config' function of the digital output subdevice to enable/disable writing to the eeprom on the board. Remove this function. 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-13staging: comedi: addi_apci_3200: fix digital output 'insn_bits' functionH Hartley Sweeten1-4/+2
This driver does not follow the comedi API. The digital output 'insn_bits' function is passed a mask value in data[0] indicating which output bits in data[1] are changing. The function is then supposed to update the outputs accordingly and then return the current state of the outputs in data[1]. Currently this driver uses the 'insn_write' function to update either a single or all the output channels. And it uses the 'insn_bits' function to read either a single or all the output channel states. Fix the 'insn_bits' function so it works like the comedi core expects. The core can then use the function to emulate the 'insn_read' and 'insn_write' functions for individual channels. 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-13staging: comedi: addi_apci_3200: fix digital input 'insn_bits' functionH Hartley Sweeten1-2/+2
This driver does not follow the comedi API. The digital input 'insn_bits' function is supposed to return the status of all the input channels in data[1]. Currently this function uses the data[0] parameter to determine if a single channel or all thei nput channels are being read. The status is then being returned in data[0]. Fix the function so it works like the comedi core expects. The core can then use the function to emulate the 'insn_read' function for individual channels. 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-13staging: comedi: addi_apci_3200: merge addi_apci_3300 supportH Hartley Sweeten1-0/+32
The addi_apci_3200 and addi_apci_3300 board share the same low-level hardware code. Merge the 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-01staging: comedi: addi-data: remove addi_amcc_s5933.hH Hartley Sweeten1-1/+1
Now that the PCI bus walking has been removed from the addi-data drivers, the only differenced between addi_amcc_s9533.h and the standard comedi amcc_s5933.h is the additional defines for the apci3120 "ADDON RELATED ADDITIONS". Move those defines to hwdrv_apci3120.c. Modify all the addi-data drivers to then include the standard comedi amcc_s5933.h header and delete the duplicate in addi-data. 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-01staging: comedi: addi-data: use attach_pci callbackH Hartley Sweeten1-1/+1
Use the comedi pci auto config mechanism to attach the addi-data drivers. This allows removing all the PCI bus walking code. Add a function, addi_find_boardinfo(), to find the driver specific boardinfo. Since this function is currently in the common code we have to use the pointer to the boardinfo that is stored in the comedi_driver pointer. 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-10-31staging: comedi: addi_apci_*: add module_comedi_pci_driver()H Hartley Sweeten1-6/+32
Pull the module init code out of addi_common.c and add it to each addi-data driver. Rename the data and functions so they have namespace associated with the drivers. 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-10-31staging: comedi: addi_apci_*: remove unneeded CONFIG_APCI_* definesH Hartley Sweeten1-2/+0
These defines were needed for the #ifdef'ery that used to exist in addi_common.c. Since that has been removed these are no longer used. 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-10-30staging: comedi: addi-data: remove the boardinfo #ifdef'eryH Hartley Sweeten1-0/+36
Move the boardinfo for each addi-data driver from addi_common.c to the individual driver files. This removes the need #ifdef'ery. 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-10-30staging: comedi: addi-data: remove the MODULE_DEVICE_TABLE #ifdef'eryH Hartley Sweeten1-0/+7
Move the MODULE_DEVICE_TABLE for each addi-data driver from addi_common.c to the individual driver files. This removes the need #ifdef'ery. 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-10-30staging: comedi: addi-data: remove the addi-data #include ifdef'eryH Hartley Sweeten1-0/+12
Move the addi-data specific #include's from addi_common.h to the individual driver files. The apci-1710, apci-3200, and apci-3300 drivers still have floating point code in them and are currently disabled in the Kconfig and Makefile. For now, move the fpu_{begin,end} functions from addi_common.c to the main driver file so we can get rid of the #ifdef'ery. 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-10-30staging: comedi: addi-data: move the main #include's to the driversH Hartley Sweeten1-0/+8
The addi-data drivers are all built by the main driver files including addi-data/addi_common.c. That file then includes other files depending on what driver is being compiled. This is makes the code quite messy and hard to follow. Start cleaning it up by removing the unneeded #include's in addi_common.c and moving the some of the comedi #include's into the individual driver files. This is the first step in getting rid of the #ifdef'ery in addi_common.c. 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>
2010-06-04Staging: comedi: Give the addi_apci_* drivers different driver namesIan Abbott1-0/+2
It is not currently possible for more than one of the addi_apci_* drivers to register themselves with comedi at once because they all use the same comedi driver name "addi_common". Give them different names. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2009-04-03Staging: comedi: add addi-data driversADDI-DATA GmbH1-0/+3
This adds the addi-data family of comedi drivers to the staging tree From: ADDI-DATA GmbH <info@addi-data.com> Cc: David Schleef <ds@schleef.org> Cc: Frank Mori Hess <fmhess@users.sourceforge.net> Cc: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>