History log of /drivers/staging/comedi/drivers/amplc_dio200.h
Revision Date Author Comments
bb83abed7dd79ae1f0471c53144934efa57d7919 12-Aug-2014 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: amplc_dio200: remove dio200_common_detach()

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>
c3f6aa33ed102cc36c3e2308c81f10fec62439f9 12-Aug-2014 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: amplc_dio200.h: remove boardinfo 'mainshift'

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>
c1b0cccc59a30df185a23938dbd761650ef12337 12-Aug-2014 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: amplc_dio200.h: rename 'has_enhancements' in boardinfo

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>
f6ce09504ddc81aec07ddfcb16ad3c5b80ab19d0 12-Aug-2014 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: amplc_dio200.h: remove struct dio200_layout definition

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>
9e1e2739ef967a3cb60ee73cb70dfdcb0515c8d3 01-Aug-2014 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: amplc_dio200.h: remove 'mainsize' from boardinfo

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>
e2dfb515764dcaf156bd06af998842afe19bd337 01-Aug-2014 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: amplc_dio200_pci: remove 'mainsize' from PCI boardinfo

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>
7560e527534570199382ac72278301e9ac82920e 01-Aug-2014 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: amplc_dio200: remove 'bustype' from boardinfo

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>
76212bf32b92a62d7057159498b7d9475d7bf295 01-Aug-2014 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: amplc_dio200: remove private data

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>
0c3dfdc2d9a913c227a71f8cf728a70316c3abb4 30-Jul-2014 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: amplc_dio200: use the comedi_device 'mmio' member

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>
641f064e5df6fb3aaeb6256031a153a5efb16ca6 25-Apr-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: remove FSF address from boilerplate text

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>
7ff7e4c2c460f55a96d09b33ce421f91a9b6a0fb 18-Mar-2013 Ian Abbott <abbotti@mev.co.uk> staging: comedi: amplc_dio200: split into ISA, PCI and common

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>