[go: nahoru, domu]

History log of /drivers/staging/comedi/drivers/addi_apci_16xx.c
Revision Date Author Comments
aac307f9dd5ce1fe651140a036ab4b0a0571b54a 26-Aug-2014 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: comedi_pci: introduce comedi_pci_detach()

Introduce a generic (*detach) function for comedi PCI drivers to handle
the boilerplate code needed to detach a PCI driver.

This function works similar to comedi_legacy_detach() where it will:

* free the dev->irq if it has been requested
* iounmap the dev->mmio addres if it has been ioremap'ed

The helper then calls comedi_pci_disable() to release the regions and
disable the PCI device.

Use the new helper directly for the (*detach) in the following cases:

* where comedi_pci_disable() is used directly for the (*detach)
* where the detach function is just boilerplate

Use the new helper in the (*detach) of the simpler PCI drivers. Call
the helper after disabling interrupts (reset) and before any additional
cleanup (kfree) to avoid any race conditions with the interrupt handler.

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>
41e043fcfa2236bb2c4a8335eb09f4c8cee224b3 03-Dec-2013 Jingoo Han <jg1.han@samsung.com> staging: remove DEFINE_PCI_DEVICE_TABLE macro

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>
a485f4d60e7de92b65e3f03ccd6c3b8cb0062c32 30-Aug-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: addi_apci_16xx: use comedi_dio_update_state()

The extra mask used to only update the channels configured as outputs is
not necessary in this driver. Remove it and use comedi_dio_update_state()
to handle the boilerplate code to update the subdevice s->state.

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>
5dacadcca3176e2b1f8db662e503c080484d71fa 06-Aug-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: drivers: use comedi_dio_insn_config() for complex cases

Convert the drivers with complex, port programmable i/o, to use the
comedi_dio_insn_config() helper function.

All of these drivers have some sort of 'port' programmable i/o where multiple
i/o channels are configured as a group. The 'mask' associated with the group
is passed to comedi_dio_insn_config() so that all the channels are configured.

Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com>
Reviewed-by: Ian Abbott <abbotti@mev.co.uk>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
3457bfd6dfb38f7bb66a227fe3473bad4773de06 13-Aug-2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org> Revert "staging: comedi: drivers: use comedi_dio_insn_config() for complex cases"

This reverts commit f21c53945cb95f66faa9636af5f23cb00ba73019.

I applied the wrong patch :(

Cc: H Hartley Sweeten <hsweeten@visionengravers.com>
Cc: Ian Abbott <abbotti@mev.co.uk>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
f21c53945cb95f66faa9636af5f23cb00ba73019 06-Aug-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: drivers: use comedi_dio_insn_config() for complex cases

Convert the drivers with complex, port programmable i/o, to use the
comedi_dio_insn_config() helper function.

All of these drivers have some sort of 'port' programmable i/o where multiple
i/o channels are configured as a group. The 'mask' associated with the group
is passed to comedi_dio_insn_config() so that all the channels are configured.

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>
ce157f8032bbd46d9427034c335b0afd751da25d 25-Jun-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: don't rely on comedidev.h to include headers

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>
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>
818f569fe930c5b8a05d1a44ece3c63c99c13c88 13-Mar-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi_pci: pass comedi_device to comedi_pci_enable()

Make comedi_pci_enable() use the same parameter type as
comedi_pci_disable(). This also allows comedi_pci_enable
to automatically determine the resource name passed to
pci_request_regions().

Make sure the errno value returned is passed on instead of
assuming an errno. Also, remove any kernel noise that is
generated when the call fails.

The National Instruments drivers that use the mite module
currently enable the PCI device in the mite module. For
those drivers move the call to comedi_pci_enable into the
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>
7f072f54ae5dc9965cbe450419b1389d13e2b849 13-Mar-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi_pci: make comedi_pci_disable() safe to call

Currently all the comedi PCI drivers need to do some checking in
their (*detach) before calling comedi_pci_disable() in order to
make sure the PCI device has actually be enabled.

Change the parameter passed to comedi_pci_disable() from a struct
pci_dev pointer to a comedi_device pointer and have comedi_pci_disable()
handle all the checking.

For most comedi PCI drivers this also allows removing the local
variable holding the pointer to the pci_dev. For some of the drivers
comedi_pci_disable can now be used directly as the (*detach) function.

The National Instruments drivers that use the mite module currently
enable/disable the PCI device in the mite module. For those drivers
move the call to comedi_pci_disable into the driver and make sure
dev->iobase is set to a non-zero value.

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>
5e7479f1d88024669b2ab909a5bb4a74fb9df8e7 05-Mar-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: addi_apci_16xx: remove the boardinfo from the comedi_driver

This driver uses the comedi auto attach mechanism and does not need
to supply the 'num_names', 'board_name', and 'offset' fields so that
the comedi core can search the boardinfo. These fields are only used
for the legacy attach.

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>
a4732f354487ba42ad3dc22dbdab33a3137e6041 05-Mar-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: addi_apci_16xx: use the pci id_table 'driver_data'

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.

This allows removing the 'vendor' and 'device' data from the boardinfo
as well the search function that was used to locate the boardinfo for
the PCI device.

Since the PCI device ids are now only used in the id_table, remove the
defines and open code the device ids.

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>
b8f4ac237e382accd4b30c75043939f7ed9e79a6 05-Mar-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: comedi_pci: change the comedi_pci_auto_config() 'context'

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>
33782dd5edf8db3cdb7c81a3523bf743dd0209b7 30-Jan-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: conditionally build in PCI driver support

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>
9901a4d75d007686e8f6473189cafc4b216b7449 22-Jan-2013 Peter Huewe <peterhuewe@gmx.de> staging/comedi: Use comedi_pci_auto_unconfig directly for pci_driver.remove

(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>
b194218dba531b9c36080d29d10fdf9ef96a15bf 22-Jan-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: addi_apci_16xx: add defines for the PCI device ids

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>
5e72c1744fda105e0f1de6e33bd901a4df1bbaed 22-Jan-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: addi_apci_16xx: change the MODULE_DESCRIPTION

Change the MODULE_DESCRIPTION to something more useful than the
generic "Comedi low-level driver" so that modinfo provides a
better description of the 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>
1cc2be913965d34439d6fdbbd1627d4077d4892d 22-Jan-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: addi_apci_16xx: remove unnecessary include

This driver does not use any of the functionality provided by
comedi_fc.h. Remove the #include.

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>
0ecb3ea9cef6fe92860d065a0d9a87c9f7f50243 22-Jan-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: addi_apci_16xx: add missing copyright comment

Add the missing copyright information. This information was
originally in the hwdrv_apci16xx.c file.

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>
92eb37959f0e98376969e97bb6518c0f4b738241 22-Jan-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: addi_apci_16xx: rewrite low-level support code

The current low-level support code in hwdrv_apci16xx.c is seriously
broken. Besides that, it's overly complicated.

Rewrite, and simplify, the low-level code so it complies with the
comedi API.

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>
0e2bd50b393084a338a6a21063ef012c5a2720fb 18-Jan-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: addi_apci_16xx: cleanup addi_find_boardinfo()

This function was originally in the addi-data "common" code and
required using pointer math to access the boardinfo data using
the void * 'dev->driver->board_name'. Now that the function is
local to this driver we can access the boardinfo directly and
remove the pointer math.

Rename the function so it has namespace associated with this
driver.

Also, for aesthetic reasons, globally rename the local variable used
for the boardinfo pointer from 'this_board' to '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>
2a2e63dd98ff5310b4677e177939dd2232e0c1c3 18-Jan-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: addi_apci_16xx: redefine the boardinfo

Currently this driver uses the struct addi_board from the addi-data
"common" code to define the boardinfo. This struct contains a lot
of information that is not used in this driver.

Introduce a private struct in the driver that just contains the
needed information.

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>
8d5a19db72f72a730f3a1938044f12d9e1cf25a5 18-Jan-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: addi_apci_16xx: cleanup subdevice initialization

The comedi subdevice in this driver is a simple digital i/o
device.

Currently, the code abuses the comedi API by redefining the
COMEDI_SUBD_SERIAL type as COMEDI_SUBD_TTLIO and using that
for the 's->type'. Remove the defines and use the proper type,
COMEDI_SUBD_DIO.

The current code also sets the subdev_flags SDF_GROUND and SDF_COMMON
for the subdevice. These flags really only have meaning for analog
subdevices. Remove them.

All the boards supported by this driver use the same functions for
the subdevice 'insn_*' operations. Remove this information from
the boardinfo and set the s->insn_* operations directly in the init.

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>
b6e7714cc261ef478f95449a32565d41378c9a87 18-Jan-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: addi_apci_16xx: only allocate needed subdevices

The addi-data "common" code always allocated 7 subdevices. This
driver only uses 1. Change the allocation and remove the unused
subdevices.

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>
a6c2f99ec6a10eb5d6730087d79eb68b51af3c4e 18-Jan-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: addi_apci_16xx: remove devpriv->s_EeParameters usage

This information is not used in the driver. Just remove 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>
6b9633b4c70a405fe0ffad6f5bbb59f0ad1eb5d9 18-Jan-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: addi_apci_16xx: remove devpriv->iobase usage

The iobase address stored in devpriv->iobase is also stored in
dev->iobase. Use that 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>
ebea8c69d323acfc13f85b067a8608ec10794638 18-Jan-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: addi_apci_16xx: simplify PCI bar reading

The boards supported by this driver do not have an eeprom. Knowing
this information allows simplifying the code that reads the PCI
bars to get the iobase addresses.

The only 'iobase' actually used by this driver is found in PCI
bar 0. Don't bother reading the other PCI bars.

Also, since 'dw_AiBase' is not ioremap'ed we can remove the check
and iounmap in the detach.

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>
046e0d10bda65c2b096627765b302b3123beee47 18-Jan-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: addi_apci_16xx: remove interrupt support code

The boards supported by this driver do not have any interrupt
capable devices. Remove the unused interrupt support code.

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>
58b6728c8cecd5022be68b3ac513d7055b869710 18-Jan-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: addi_apci_16xx: remove i_APCI16XX_Reset()

The 'reset' function for this driver doesn't do anything. Remove
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>
4d59827aecebf3f0253eae08ced09343244f3466 18-Jan-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: addi_apci_16xx: remove eeprom support code

Reading the eeprom on the boards supported by this driver is not
necessary. All the information required is in the boardinfo.

Remove the eeprom support code since it's not really interesting
or useful.

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>
a03953fbd896354e1f9a1e165d9c0c8a571a4a00 18-Jan-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: addi_apci_16xx: board does not have a timer

The boards supported by this driver do not have a timer subdevice.
Remove the subdevice init for 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>
243a55c57e9842c2a9fcc90018156dafb6642064 18-Jan-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: addi_apci_16xx: board does not have digital outputs

The boards supported by this driver do not have digital outputs.
Remove the subdevice init 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>
9c0c93a844dbc5bf55594baed4e31c7ddc7cb7ed 18-Jan-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: addi_apci_16xx: board does not have digital inputs

The boards supported by this driver do not have digital inputs.
Remove the subdevice init 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>
b985cf427d95f49be2b534ce7d3bd3150d2725f4 18-Jan-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: addi_apci_16xx: board does not have analog outputs

The boards supported by this driver do not have analog outputs.
Remove the subdevice init 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>
564aa830e61df7c10d36cab31dd975a4fe003c97 18-Jan-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: addi_apci_16xx: board does not have analog inputs

The boards supported by this driver do not have analog inputs.
Remove the subdevice init 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>
368463328badaa5431416574d9a1f60de8ae04cf 18-Jan-2013 H Hartley Sweeten <hsweeten@visionengravers.com> staging: comedi: addi_apci_16xx: separate from addi_common.c

This driver is for two simple ttl digital output boards. One with
48 channels the other with 96. Using the addi-data "common" code
introduces a lot of bloat.

Copy the code in addi_common.c to this driver and remove the #include
that caused addi_common.c to be compiled with this driver. This will
allow removing the bloat.

Rename the auto_attach and detach functions so they have namespace
associated with this 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>
53b800198592b0ff96577ecc5f116f7d902a4362 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> staging: comedi: remove use of __devexit

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>
a690b7e535f2f97a3a05ee570715abeb60a8910f 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> staging: comedi: remove use of __devinit

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>
a471eace7baa40cdf16d3f26b2f78ddce613ca8f 19-Nov-2012 Bill Pemberton <wfp5p@virginia.edu> staging: comedi: remove use of __devexit_p

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>
92cba8f3b42e1cb8211b64e91618102ecc8f0a6d 06-Nov-2012 H Hartley Sweeten <hartleys@visionengravers.com> staging: comedi: addi-data: use auto_attach instead of attach_pci

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>
bf36f012c7ddaff083bb0ef187feddf4d85507a0 01-Nov-2012 H Hartley Sweeten <hartleys@visionengravers.com> staging: comedi: addi-data: remove addi_amcc_s5933.h

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>
41be28db534330192bbbec9783e6d43d4432a7fb 01-Nov-2012 H Hartley Sweeten <hartleys@visionengravers.com> staging: comedi: addi-data: use attach_pci callback

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>
20a22b706b8ee37d1a2282f2c9bf7f2c73a5a7a5 31-Oct-2012 H Hartley Sweeten <hartleys@visionengravers.com> staging: comedi: addi_apci_*: add module_comedi_pci_driver()

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>
c33ef61ff9f731efa4a630a9566a4cdf8945f4af 31-Oct-2012 H Hartley Sweeten <hartleys@visionengravers.com> staging: comedi: addi_apci_*: remove unneeded CONFIG_APCI_* defines

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>
c0a053b8b24d72413a82a16a41f635e6040ccf34 30-Oct-2012 H Hartley Sweeten <hartleys@visionengravers.com> staging: comedi: addi-data: remove the boardinfo #ifdef'ery

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>
317285d71acccbda2fbab7e53d6b33c52a151a32 30-Oct-2012 H Hartley Sweeten <hartleys@visionengravers.com> staging: comedi: addi-data: remove the MODULE_DEVICE_TABLE #ifdef'ery

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>
bf6a1578c10a4f3ef94a3c744267f18f9c3642bd 30-Oct-2012 H Hartley Sweeten <hartleys@visionengravers.com> staging: comedi: addi-data: remove the addi-data #include ifdef'ery

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>
3d41c44370a9a1e78e53c9997289347ec97d46ee 30-Oct-2012 H Hartley Sweeten <hartleys@visionengravers.com> staging: comedi: addi-data: move the main #include's to the drivers

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>
90f703d30dd3e0c16ff80f35e34e511385a05ad5 06-Jun-2010 Arun Thomas <arun.thomas@gmail.com> Staging: comedi: Remove COMEDI_MODULES_MACRO

Add MODULE_AUTHOR, MODULE_LICENSE, and MODULE_DESCRIPTION calls
to the respective C source files instead of calling COMEDI_MODULES_MACRO

Signed-off-by: Arun Thomas <arun.thomas@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
6d8b0f5be5108f6a3fc922ca4acfbf10e14d6cd0 19-May-2010 Ian Abbott <abbotti@mev.co.uk> Staging: comedi: Give the addi_apci_* drivers different driver names

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>
c995fe9475e062bab6f5a45ed28cd2d3d955ef43 13-Feb-2009 ADDI-DATA GmbH <info@addi-data.com> Staging: comedi: add addi-data drivers

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>