Skip to content

Commit

Permalink
staging: comedi: addi_apci_3120: merge in addi_apci_3001 driver
Browse files Browse the repository at this point in the history
The addi_apci_3120 and addi_apci_3001 drivers share the same low-level
board support code (hwdrv_apci3120). Merge the boardinfo and PCI_DEVICE
information from the addi_apci_3001 driver into the addi_apci_3120
driver and delete then delete the addi_apci_3001 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>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Nov 2, 2012
1 parent 1180c88 commit 973781a
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 101 deletions.
14 changes: 2 additions & 12 deletions drivers/staging/comedi/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -647,22 +647,12 @@ config COMEDI_ADDI_APCI_2200
To compile this driver as a module, choose M here: the module will be
called addi_apci_2200.

config COMEDI_ADDI_APCI_3001
tristate "ADDI-DATA APCI_3001 support"
depends on VIRT_TO_BUS
select COMEDI_FC
---help---
Enable support for ADDI-DATA APCI_3001 cards

To compile this driver as a module, choose M here: the module will be
called addi_apci_3001.

config COMEDI_ADDI_APCI_3120
tristate "ADDI-DATA APCI_3520 support"
tristate "ADDI-DATA APCI_3120/3001 support"
depends on VIRT_TO_BUS
select COMEDI_FC
---help---
Enable support for ADDI-DATA APCI_3520 cards
Enable support for ADDI-DATA APCI_3120/3001 cards

To compile this driver as a module, choose M here: the module will be
called addi_apci_3120.
Expand Down
1 change: 0 additions & 1 deletion drivers/staging/comedi/drivers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ obj-$(CONFIG_COMEDI_ADDI_APCI_16XX) += addi_apci_16xx.o
obj-$(CONFIG_COMEDI_ADDI_APCI_2016) += addi_apci_2016.o
obj-$(CONFIG_COMEDI_ADDI_APCI_2032) += addi_apci_2032.o
obj-$(CONFIG_COMEDI_ADDI_APCI_2200) += addi_apci_2200.o
obj-$(CONFIG_COMEDI_ADDI_APCI_3001) += addi_apci_3001.o
obj-$(CONFIG_COMEDI_ADDI_APCI_3120) += addi_apci_3120.o
obj-$(CONFIG_COMEDI_ADDI_APCI_3501) += addi_apci_3501.o
obj-$(CONFIG_COMEDI_ADDI_APCI_3XXX) += addi_apci_3xxx.o
Expand Down
88 changes: 0 additions & 88 deletions drivers/staging/comedi/drivers/addi_apci_3001.c

This file was deleted.

37 changes: 37 additions & 0 deletions drivers/staging/comedi/drivers/addi_apci_3120.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,42 @@ static const struct addi_board apci3120_boardtypes[] = {
.timer_config = i_APCI3120_InsnConfigTimer,
.timer_write = i_APCI3120_InsnWriteTimer,
.timer_read = i_APCI3120_InsnReadTimer,
}, {
.pc_DriverName = "apci3001",
.i_VendorId = PCI_VENDOR_ID_ADDIDATA_OLD,
.i_DeviceId = 0x828D,
.i_IorangeBase0 = AMCC_OP_REG_SIZE,
.i_IorangeBase1 = APCI3120_ADDRESS_RANGE,
.i_IorangeBase2 = 8,
.i_PCIEeprom = ADDIDATA_NO_EEPROM,
.i_NbrAiChannel = 16,
.i_NbrAiChannelDiff = 8,
.i_AiChannelList = 16,
.i_AiMaxdata = 0xfff,
.pr_AiRangelist = &range_apci3120_ai,
.i_NbrDiChannel = 4,
.i_NbrDoChannel = 4,
.i_DoMaxdata = 0x0f,
.i_Dma = 1,
.i_Timer = 1,
.b_AvailableConvertUnit = 1,
.ui_MinAcquisitiontimeNs = 10000,
.ui_MinDelaytimeNs = 100000,
.interrupt = v_APCI3120_Interrupt,
.reset = i_APCI3120_Reset,
.ai_config = i_APCI3120_InsnConfigAnalogInput,
.ai_read = i_APCI3120_InsnReadAnalogInput,
.ai_cmdtest = i_APCI3120_CommandTestAnalogInput,
.ai_cmd = i_APCI3120_CommandAnalogInput,
.ai_cancel = i_APCI3120_StopCyclicAcquisition,
.di_read = i_APCI3120_InsnReadDigitalInput,
.di_bits = i_APCI3120_InsnBitsDigitalInput,
.do_config = i_APCI3120_InsnConfigDigitalOutput,
.do_write = i_APCI3120_InsnWriteDigitalOutput,
.do_bits = i_APCI3120_InsnBitsDigitalOutput,
.timer_config = i_APCI3120_InsnConfigTimer,
.timer_write = i_APCI3120_InsnWriteTimer,
.timer_read = i_APCI3120_InsnReadTimer,
},
};

Expand All @@ -77,6 +113,7 @@ static void __devexit apci3120_pci_remove(struct pci_dev *dev)

static DEFINE_PCI_DEVICE_TABLE(apci3120_pci_table) = {
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA_OLD, 0x818d) },
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA_OLD, 0x828d) },
{ 0 }
};
MODULE_DEVICE_TABLE(pci, apci3120_pci_table);
Expand Down

0 comments on commit 973781a

Please sign in to comment.