summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2012-10-25vme: vme_tsi148.c: use module_pci_driver to simplify the codeWei Yongjun
Use the module_pci_driver() macro to make the code simpler by eliminating module_init and module_exit calls. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-25vme: vme_ca91cx42.c: use module_pci_driver to simplify the codeWei Yongjun
Use the module_pci_driver() macro to make the code simpler by eliminating module_init and module_exit calls. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-25vme: vme_vmivme7805.c: use module_pci_driver to simplify the codeWei Yongjun
Use the module_pci_driver() macro to make the code simpler by eliminating module_init and module_exit calls. dpatch engine is used to auto generate this patch. (https://github.com/weiyj/dpatch) Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-25staging/comedi: Use pr_ or dev_ printks in drivers/serial2002.cYAMANE Toshiaki
fixed below checkpatch warning. - WARNING: Prefer netdev_err(netdev, ... then dev_err(dev, ... then pr_err(... to printk(KERN_ERR ... and added pr_fmt. Signed-off-by: YAMANE Toshiaki <yamanetoshi@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-25staging: comedi: comedidev.h: add PCI_VENDOR_ID_AMPLICONH Hartley Sweeten
Add a define for the Amplicon Liveline Limited PCI vendor id. Remove the duplicates in 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-10-25staging: comedi: dyna_pci10xx: remove PCI_VENDOR_ID_DYNALOGH Hartley Sweeten
The PCI chip used on this board is from PLX Technologies Inc. As stated in the comments of this driver, Dynalog does not have a registered PCI vendor id so this board uses the PLX vendor id. The kernel provides an id for that vendor in pci_ids.h (PCI_VENDOR_ID_PLX). Use it instead of creating a duplicate with a different name. 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-25staging: comedi: comedidev.h: add PCI_VENDOR_ID_AMCCH Hartley Sweeten
Add a define for the Applied Micro Circuits Corp. PCI vendor id. Remove the duplicates in 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-10-25staging: comedi: comedidev.h: add PCI_VENDOR_ID_RTDH Hartley Sweeten
Add a define for the RTD Embedded Technologies, Inc. PCI vendor id. Remove the duplicates in 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-10-25staging: comedi: comedidev.h: add PCI_VENDOR_ID_IOTECHH Hartley Sweeten
Add a define for the Iotech Inc. PCI vendor id. Remove the duplicates in 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-10-25staging: comedi: comedidev.h: add PCI_VENDOR_ID_KOLTERH Hartley Sweeten
Add a define for the Kolter Electronic PCI vendor id. Remove the duplicates in 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-10-25staging: comedi: comedidev.h: add PCI_VENDOR_ID_DTH Hartley Sweeten
Add a define for the Data Translation, Inc. PCI vendor id. Remove the duplicates in 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-10-25staging: comedi: addi_common: use PCI_VENDOR_ID_ADDIDATA_OLDH Hartley Sweeten
The kernel provides this id in pci_ids.h. Use it instead of creating duplicates of the id with different names. 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-25staging: comedi: addi_common: use PCI_VENDOR_ID_ADDIDATAH Hartley Sweeten
The kernel provides this id in pci_ids.h. Use it instead of creating duplicates of the id with different names. 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-25staging: comedi: hwdrv_APCI1710: remove APCI1710_BOARD_VENDOR_IDH Hartley Sweeten
This vendor id exists in pci_ids.h as PCI_VENDOR_ID_ADDIDATA_OLD. Use the kernels provided id instead. 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-25staging: comedi: comedidev.h: add PCI_VENDOR_ID_MEILHAUSH Hartley Sweeten
Add a define for the Meilhaus Electronic GmbH Germany PCI vendor id. Remove the duplicates in 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-10-25staging: comedi: comedidev.h: add PCI_VENDOR_ID_ADVANTECHH Hartley Sweeten
Add a define for the Advantech Co., Ltd. PCI vendor id. Remove the duplicates in 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-10-25staging: comedi: cb_pcidda: cleanup cb_pcidda_calibrate()H Hartley Sweeten
Refactor the function to make it a bit more concise and remove all the one-line helper functions. 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-25staging: comedi: cb_pcidda: cleanup cb_pcidda_ao_winsn()H Hartley Sweeten
For aesthetic reasons, rename the function to help when searching for 'insn_write' functions. Remove the obvious comments and fix the return from the 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-10-25staging: comedi: cb_pcidda: cleanup DADATA defineH Hartley Sweeten
Rename the define used for the D/A Data register so that is has namespace with this driver. Change the define so that it takes the channel as a parameter to calculate the correct register offset. 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-25staging: comedi: cb_pcidda: cleanup DACCONTROL definesH Hartley Sweeten
Rename the defines used for the D/A Control register so that they have namespace with this driver. Cleanup the use of these defines. 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-25staging: comedi: cb_pcidda: cleanup the dio register definesH Hartley Sweeten
Remove the unused defines for the dio registers. Add two new defines to document the iobase registers for the two 8255 devices. 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-25staging: comedi: cb_pcidda: cleanup the boardinfoH Hartley Sweeten
For aesthetic reasons, add some whitespace to the boardinfo to improve readability. Also, remove the cut-and-paste comment from the skel 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-10-25staging: comedi: cb_pcidda: remove the private data 'status'H Hartley Sweeten
This variable in the private data is only used to output some kernel noise during the attach about certian board types not being fully tested. All of the boards supported by this driver share a common register map and should be compatible. Just remove the 'status' and the noise. 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-25staging: comedi: cb_pcidda: cleanup the copyright and comedi commentsH Hartley Sweeten
Reformat the copyright and driver description comments to follow the preferred block comment style. Reword the driver description to follow comedi style described in the skel 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-10-25staging: comedi: cb_pcidda: cleanup the analog output rangeH Hartley Sweeten
All the boards supported by this driver have the same analog output ranges. Remove the 'range' from the boardinfo and just use the 'cb_pcidda_ranges' directly when initializing the 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>
2012-10-25staging: comedi: cb_pcidda: check for subdev_8255_init() failureH Hartley Sweeten
The subdev_8255_init() can fail, make sure to check for it. This board has two 8255 subdevices, one at iobase PCI bar2 and one at iobase PCI bar2 + 4. Init the subdevices using a for() loop to make the code a bit more concise. 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-25staging: comedi: cb_pcidda: rename local variable 'index'H Hartley Sweeten
For aesthetic reasons, rename the local variable 'index' used in the attach_pci function to simply 'i'. 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-25staging: comedi: cb_pcidda: remove the debug output of the eeprom dataH Hartley Sweeten
This is just noise. 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-25staging: comedi: cb_pcidda: remove private data variable 'digitalio'H Hartley Sweeten
The private data variable 'digitalio' is only used to hold the PCI base address for the 8255 devices on the board. This value is then passed to subdev_8255_init() and stored in it's own private data. There is no need to keep the value in the private data for the board. 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-25staging: comedi: cb_pcidda: cleanup the private dataH Hartley Sweeten
Remove the unused variables in the private data. Also remove the cut-and-paste comment from the skel 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-10-25staging: comedi: cb_pcidda: remove private data variable 'dac'H Hartley Sweeten
The private data variable 'dac' is used to hold the PCI base address for the board. Use the 'iobase' variable provided by the comedi_device instead. 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-25staging: comedi: comedidev.h: add PCI_VENDOR_ID_CBH Hartley Sweeten
Add a define for the ComputerBoards/Measurement Computing PCI vendor id. Remove the duplicates in 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-10-25staging: comedi: cb_pcidda: add defines for the PCI device idsH Hartley Sweeten
The PCI device ids supported by this driver are used multiple places in the code. To improve maintainability, create #define's for 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>
2012-10-25staging: comedi: cb_pcidda: remove code in #if 0/#endif blocksH Hartley Sweeten
The functions cb_pcidda_ai_cmd(), cb_pcidda_ai_cmdtest(), and cb_pcidda_ns_to_timer() are all partially coded stubs for command support with the analog output subdevice. Just remove the code since it is #if 0'ed out. It can be added back later if command support is completed. 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-25staging: comedi: cb_pcidda: fix error test in cb_pcidda_attach_pci()H Hartley Sweeten
As pointed out by Fengguang Wu, the error test after finding the boardinfo should be testing for (!thisboard). 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>
2012-10-24staging: comedi: Kconfig: update COMEDI_AMPLC_DIO200_PCI optionIan Abbott
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-24staging: comedi: amplc_dio200: support multiple read/write of counterIan Abbott
Change the `insn_read` and `insn_write` handlers of the '8254' counter subdevices to support reading and writing multiple data values. (Writing multiple values isn't very useful, but if that's what the user wants....) Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-24staging: comedi: comedi.h: add clock sources for amplc_dio200 timerIan Abbott
Add clock source constants for the timer subdevice of the PCIe cards 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-24staging: comedi: amplc_dio200: implement timer subdeviceIan Abbott
Implement the timer subdevice for the new PCIe boards. The subdevice was previously marked as unused, but was reserved for this purpose. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-24staging: comedi: amplc_dio200: add 32-bit register access functionsIan Abbott
These are currently unused but will be used to support extra features of the PCIe boards. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-24staging: comedi: comedi.h: extra clock and gate sources for amplc_dio200Ian Abbott
Add constants to "comedi.h" for the extra clock and gate sources allowed by the new PCIe cards 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-24staging: comedi: amplc_dio200: allow extra clock and gate sourcesIan Abbott
One of the enhancements of the new PCIe boards is the addition of extra clock and gate sources. Allow clock and gate sources up to 31 for these boards (compared to 7 for the old boards) although most of those are reserved for future use. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-24staging: comedi: amplc_dio200: enable enhanced features of PCIe boardsIan Abbott
The new PCIe boards PCIe215, PCIe236 and PCIe296 have some enhanced features (over the older boards), although none of these features are supported by this driver yet. Enable the enhanced features in hardware and use `dio200_layouts[]` to indicate which boards support the enhanced features. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-24staging: comedi: amplc_dio200: allow generation of PCIe interruptsIan Abbott
The new PCIe boards PCIe215, PCIe236 and PCIe296 need a special register setting to allow generation of interrupts on the PCIe bus. Add `dio200_pcie_board_setup()` to do this and call it from `dio200_attach_pci()` for those boards. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-24staging: comedi: amplc_dio200: support PCIe215, PCIe236 and PCIe296Ian Abbott
Add preliminary support for the above PCIe boards. The interrupt subdevice is not working yet as the boards need some additional initialization to enable interrupts. Reserve an unused subdevice that will eventually become a timer subdevice. Some unused subdevices have been added between the used subdevices on the PCIe215 and PCIe236. This is so the subdevice numbers will match a pattern-matching feature to be added at a later date, where the pattern-match specifications for a subdevice include pattern-match results from other subdevices, specified by index. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-24staging: comedi: amplc_dio200: add register shift to board infoIan Abbott
Add `mainshift` member to `struct dio200_board` to hold the amount of left-shift required for main register offsets. This is 0 for all the boards currently supported so it doesn't need initializing explicitly in any current element of `dio200_boards[]`. It will be non-zero for some new boards to be supported by this driver. Modify the register access functions `dio200_read8()` and `dio200_write8()` to take the shift into account. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-24staging: comedi: amplc_dio200: add min register region size in boardIan Abbott
Store the length of the main register region in new member `mainsize` of `struct dio200_board` and initialize it in each element of `dio200_boards[]`. For all currently supported boards this is initialized to `DIO200_IO_SIZE` (0x20), but will be different for newer boards to be supported in the future. For ISA boards, this is the actual region length requested, but for PCI boards it's the minimum expected region length. Verify that the PCI BAR region length is sufficient in `dio200_attach_pci()`. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-24staging: comedi: amplc_dio200: add PCI BAR information to boardIan Abbott
Add `mainbar` member to `struct dio200_board` to hold the PCI BAR number for the main registers. This is `2` for the PCI boards currently supported (PCI215 and PCI272) but will be different for some new boards to be supported later. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-24staging: comedi: amplc_dio200: support memory-mapped I/OIan Abbott
The boards currently supported by this module all use port I/O. Support memory-mapped I/O as well for future PCI/PCIe cards. Define `struct dio200_region` to hold the type of register access and either the port I/O base address or an ioremapped MMIO address. Add a member `io` to the comedi device private data (`struct dio200_private`) to hold this. Use this instead of `dev->iobase`. Memory-mapped registers are mapped in `dio200_pci_attach()` and unmapped in `dio200_detach()`. `dio200_detach()` now uses the private data pointer `devpriv` set to `dev->private` but can return early if it is `NULL` because no clean-up needs to be done in that case. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2012-10-24staging: comedi: amplc_dio200: set dev->iobase before common attachIan Abbott
Don't pass the I/O base address to `dio200_common_attach()`. The only thing it does with it is set `dev->iobase` to the passed in value. Do that before calling `dio200_common_attach()` in order to simplify upcoming support for different register access methods. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>