summaryrefslogtreecommitdiff
path: root/drivers/staging/comedi/drivers/amplc_dio200.h
AgeCommit message (Collapse)Author
2017-11-28staging: comedi: drivers: Remove redundant license textGreg Kroah-Hartman
Now that the SPDX tag is in all comedi files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Ian Abbott <abbotti@mev.co.uk> Cc: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-28staging: comedi: add SPDX identifiers to all greybus driver filesGreg Kroah-Hartman
It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the drivers/staging/comedi files files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Ian Abbott <abbotti@mev.co.uk> Cc: H Hartley Sweeten <hsweeten@visionengravers.com> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: Philippe Ombredanne <pombredanne@nexb.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-31staging: comedi: amplc_dio200.h: make self-reliantIan Abbott
The Comedi "amplc_dio200.h" header file included by drivers for Amplicon DIO200 series cards does not compile cleanly when it is the first header included by the ".c" file. It uses `struct comedi_device *` in the parameter lists of some function prototypes, so just declare `struct comedi_device` as an incomplete type. It also uses `bool`, so include <linux/types.h> to declare 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>
2015-05-31staging: comedi: amplc_dio200.h: reformat copyright commentIan Abbott
Reformat the copyright comment at the top of the file to use the preferred block comment style. 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-08-16staging: comedi: amplc_dio200: remove dio200_common_detach()H Hartley Sweeten
This exported function just does a free_irq() to release the interrupt handler for the legacy and PCI dio200 drivers. The legacy driver also calls comedi_legacy_detach() which would also do the free_irq(). For that driver the just use comedi_legacy_detach() directly for the (*detach). For the PCI driver, add the free_irq() to the private (*datach) function. Remove the, then unused, dio200_common_detach() function. 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-08-16staging: comedi: amplc_dio200.h: remove boardinfo 'mainshift'H Hartley Sweeten
This member of the boardinfo is only set for the PCIE boards. Use the 'is_pcie' flag to determine if the offset needs to be shifted when reading/writing the registers. 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-08-16staging: comedi: amplc_dio200.h: rename 'has_enhancements' in boardinfoH Hartley Sweeten
This member of the boardinfor is only set for the PCIE boards. For aeshetics, rename it to 'is_pcie'. For clarity, use this flag in the (*auto_attach) to determine if the dio200_pcie_board_setup() function needs to be called instead of using the switch (context_model). 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-08-16staging: comedi: amplc_dio200.h: remove struct dio200_layout definitionH Hartley Sweeten
This struct is used to provide part of the boardinfo data. Using the extra indirection does not provide any additional clarity to the driver. Absorb the members from dio200_layout into dio200_board and remove the extra 'layout' indirection. For aesthetics, rename all the local variables used for the boardinfo pointer to 'board'. 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-08-16staging: comedi: amplc_dio200.h: remove 'mainsize' from boardinfoH Hartley Sweeten
This member of the boardinfo is not used by the drivers. 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>
2014-08-16staging: comedi: amplc_dio200_pci: remove 'mainsize' from PCI boardinfoH Hartley Sweeten
The 'mainsize' member in the boardinfo for the DIO200 PCI boards is only used for a sanity check of the pci_resource_len(). This sanity check is not needed. Remove the sanity check along with the 'mainsize' values in the boardinfo. 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-08-16staging: comedi: amplc_dio200: remove 'bustype' from boardinfoH Hartley Sweeten
This member of the boardinfo is not used by the driver. 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>
2014-08-16staging: comedi: amplc_dio200: remove private dataH Hartley Sweeten
The private data in this driver only has one member, 'intr_sd', which is the index to the interrupt subdevice. This member is initialized during the attach of the driver when the sd_intr subdevice is detected in the boadinfo 'layout'. The member is then used in the interrupt handler to get the pointer to the subdevice. This member is not necessary. The comedi_device 'read_subdev' is also initialized during the attach. This can be used in the interrupt handler to get the subdevice pointer. Refactor the code to not require the private data and remove the struct and its allocations. 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-30staging: comedi: amplc_dio200: use the comedi_device 'mmio' memberH Hartley Sweeten
The amplc_dio200_common module currently uses a union in the private data to determine if the hardware uses port or memory mapped I/O. Use the new 'mmio' member in the comedi_device for the ioremap'ed base address and remove all the union code. 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-05-13staging: comedi: remove FSF address from boilerplate textH Hartley Sweeten
Addresses change... Remove the paragraph with the FSF address from all the comedi source files. Also, remove the paragraph about the finding the complete GPL in the COPYING file since it's unnecessary. 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-25staging: comedi: amplc_dio200: split into ISA, PCI and commonIan Abbott
Split the "amplc_dio200" comedi driver module into separate driver modules for ISA and PCI boards with a common module for the shared code. Keep the old name "amplc_dio200" for the ISA board driver as the module may be modprobed with this name by a script. (If the script uses insmod it will need modifying to load the "amplc_dio200_common" module first.) Use the module name "amplc_dio200_pci" for the PCI board driver. On most systems this will be auto-loaded. Use the module name "amplc_dio200_common" for the module containing the shared code. This is normally loaded as a dependency of the other two modules. "amplc_dio200_common" exports the following functions: * `amplc_dio200_common_attach()`: this is basically the old `dio200_common_attach()` from the combined driver module. It is called from the driver-specific attach or auto-attach routines. * `amplc_dio200_common_detach()`: this is most of the old `dio200_detach()`. It is called from the driver-specific detach routine. * `amplc_dio200_set_enhance()`: this is a new function called during initialization of PCIe cards to enable "enhanced" mode. Signed-off-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>