summaryrefslogtreecommitdiffstats
path: root/drivers/staging/comedi/drivers/amplc_dio200.h
Commit message (Collapse)AuthorAgeFilesLines
* staging: comedi: drivers: Cleanup malformed licence identifierStephen Davies2018-12-051-1/+1
| | | | | | | | | | | | | | This patch fixes multiple occurences of the checkpatch.pl warning: WARNING: Missing or malformed SPDX-License-Identifier tag in line 1 NB. This is an additional patch and does not overlap the patch sent yesterday for 8255.h. Should have sent them all together. Newb mistake. Cc: Ian Abbott <abbotti@mev.co.uk> Cc: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Stephen Davies <davo2002@tpg.com.au> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: drivers: amplc_dio200: make bool bit-field unsigned int ↵Giulio Benetti2018-06-171-3/+3
| | | | | | | | | | | | | bit-fields. Checkpatch complains on bool bitfields to be an int or u8/u16/u32 bitfield. Make bool bit-fields to be unsigned int bit-fields. Signed-off-by: Giulio Benetti <giulio.benetti@micronovasrl.com> Reviewed-by: Ian Abbott <abbotti@mev.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* staging: comedi: drivers: Remove redundant license textGreg Kroah-Hartman2017-11-281-10/+0Star
| | | | | | | | | | | | | | | | | 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>
* staging: comedi: add SPDX identifiers to all greybus driver filesGreg Kroah-Hartman2017-11-281-0/+1
| | | | | | | | | | | | | | | | | | | | 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>
* staging: comedi: amplc_dio200.h: make self-reliantIan Abbott2015-05-311-0/+4
| | | | | | | | | | | | | 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>
* staging: comedi: amplc_dio200.h: reformat copyright commentIan Abbott2015-05-311-20/+20
| | | | | | | | | 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>
* staging: comedi: amplc_dio200: remove dio200_common_detach()H Hartley Sweeten2014-08-161-2/+0Star
| | | | | | | | | | | | | | | | | 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>
* staging: comedi: amplc_dio200.h: remove boardinfo 'mainshift'H Hartley Sweeten2014-08-161-1/+0Star
| | | | | | | | | | 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>
* staging: comedi: amplc_dio200.h: rename 'has_enhancements' in boardinfoH Hartley Sweeten2014-08-161-1/+1
| | | | | | | | | | | | | 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>
* staging: comedi: amplc_dio200.h: remove struct dio200_layout definitionH Hartley Sweeten2014-08-161-12/+4Star
| | | | | | | | | | | | | | | 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>
* staging: comedi: amplc_dio200.h: remove 'mainsize' from boardinfoH Hartley Sweeten2014-08-161-1/+0Star
| | | | | | | | 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>
* staging: comedi: amplc_dio200_pci: remove 'mainsize' from PCI boardinfoH Hartley Sweeten2014-08-161-4/+0Star
| | | | | | | | | | | 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>
* staging: comedi: amplc_dio200: remove 'bustype' from boardinfoH Hartley Sweeten2014-08-161-3/+0Star
| | | | | | | | 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>
* staging: comedi: amplc_dio200: remove private dataH Hartley Sweeten2014-08-161-7/+0Star
| | | | | | | | | | | | | | | | | | | | 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>
* staging: comedi: amplc_dio200: use the comedi_device 'mmio' memberH Hartley Sweeten2014-07-311-13/+0Star
| | | | | | | | | | | | 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>
* staging: comedi: remove FSF address from boilerplate textH Hartley Sweeten2013-05-131-5/+0Star
| | | | | | | | | | | | | | 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>
* staging: comedi: amplc_dio200: split into ISA, PCI and commonIan Abbott2013-03-251-0/+95
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>