Skip to content

Commit

Permalink
staging: comedi: addi-data: remove the boardinfo #ifdef'ery
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
H Hartley Sweeten authored and Greg Kroah-Hartman committed Oct 30, 2012
1 parent 317285d commit c0a053b
Show file tree
Hide file tree
Showing 17 changed files with 1,193 additions and 1,180 deletions.
1,180 changes: 0 additions & 1,180 deletions drivers/staging/comedi/drivers/addi-data/addi_common.c

Large diffs are not rendered by default.

27 changes: 27 additions & 0 deletions drivers/staging/comedi/drivers/addi_apci_035.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,33 @@
#include "addi-data/addi_eeprom.c"
#include "addi-data/hwdrv_apci035.c"

static const struct addi_board boardtypes[] = {
{
.pc_DriverName = "apci035",
.i_VendorId = PCI_VENDOR_ID_ADDIDATA,
.i_DeviceId = 0x0300,
.i_IorangeBase0 = 127,
.i_IorangeBase1 = APCI035_ADDRESS_RANGE,
.i_PCIEeprom = 1,
.pc_EepromChip = ADDIDATA_S5920,
.i_NbrAiChannel = 16,
.i_NbrAiChannelDiff = 8,
.i_AiChannelList = 16,
.i_AiMaxdata = 0xff,
.pr_AiRangelist = &range_apci035_ai,
.i_Timer = 1,
.ui_MinAcquisitiontimeNs = 10000,
.ui_MinDelaytimeNs = 100000,
.interrupt = v_APCI035_Interrupt,
.reset = i_APCI035_Reset,
.ai_config = i_APCI035_ConfigAnalogInput,
.ai_read = i_APCI035_ReadAnalogInput,
.timer_config = i_APCI035_ConfigTimerWatchdog,
.timer_write = i_APCI035_StartStopWriteTimerWatchdog,
.timer_read = i_APCI035_ReadTimerWatchdog,
},
};

static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = {
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x0300) },
{ 0 }
Expand Down
18 changes: 18 additions & 0 deletions drivers/staging/comedi/drivers/addi_apci_1032.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,24 @@
#include "addi-data/addi_eeprom.c"
#include "addi-data/hwdrv_apci1032.c"

static const struct addi_board boardtypes[] = {
{
.pc_DriverName = "apci1032",
.i_VendorId = PCI_VENDOR_ID_ADDIDATA,
.i_DeviceId = 0x1003,
.i_IorangeBase0 = 4,
.i_IorangeBase1 = APCI1032_ADDRESS_RANGE,
.i_PCIEeprom = ADDIDATA_EEPROM,
.pc_EepromChip = ADDIDATA_93C76,
.i_NbrDiChannel = 32,
.interrupt = v_APCI1032_Interrupt,
.reset = i_APCI1032_Reset,
.di_config = i_APCI1032_ConfigDigitalInput,
.di_read = i_APCI1032_Read1DigitalInput,
.di_bits = i_APCI1032_ReadMoreDigitalInput,
},
};

static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = {
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1003) },
{ 0 }
Expand Down
29 changes: 29 additions & 0 deletions drivers/staging/comedi/drivers/addi_apci_1500.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,35 @@
#include "addi-data/addi_eeprom.c"
#include "addi-data/hwdrv_apci1500.c"

static const struct addi_board boardtypes[] = {
{
.pc_DriverName = "apci1500",
.i_VendorId = PCI_VENDOR_ID_ADDIDATA_OLD,
.i_DeviceId = 0x80fc,
.i_IorangeBase0 = 128,
.i_IorangeBase1 = APCI1500_ADDRESS_RANGE,
.i_IorangeBase2 = 4,
.i_PCIEeprom = ADDIDATA_NO_EEPROM,
.i_NbrDiChannel = 16,
.i_NbrDoChannel = 16,
.i_DoMaxdata = 0xffff,
.i_Timer = 1,
.interrupt = v_APCI1500_Interrupt,
.reset = i_APCI1500_Reset,
.di_config = i_APCI1500_ConfigDigitalInputEvent,
.di_read = i_APCI1500_Initialisation,
.di_write = i_APCI1500_StartStopInputEvent,
.di_bits = i_APCI1500_ReadMoreDigitalInput,
.do_config = i_APCI1500_ConfigDigitalOutputErrorInterrupt,
.do_write = i_APCI1500_WriteDigitalOutput,
.do_bits = i_APCI1500_ConfigureInterrupt,
.timer_config = i_APCI1500_ConfigCounterTimerWatchdog,
.timer_write = i_APCI1500_StartStopTriggerTimerCounterWatchdog,
.timer_read = i_APCI1500_ReadInterruptMask,
.timer_bits = i_APCI1500_ReadCounterTimerWatchdog,
},
};

static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = {
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA_OLD, 0x80fc) },
{ 0 }
Expand Down
25 changes: 25 additions & 0 deletions drivers/staging/comedi/drivers/addi_apci_1516.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,31 @@
#include "addi-data/addi_eeprom.c"
#include "addi-data/hwdrv_apci1516.c"

static const struct addi_board boardtypes[] = {
{
.pc_DriverName = "apci1516",
.i_VendorId = PCI_VENDOR_ID_ADDIDATA,
.i_DeviceId = 0x1001,
.i_IorangeBase0 = 128,
.i_IorangeBase1 = APCI1516_ADDRESS_RANGE,
.i_IorangeBase2 = 32,
.i_PCIEeprom = ADDIDATA_EEPROM,
.pc_EepromChip = ADDIDATA_S5920,
.i_NbrDiChannel = 8,
.i_NbrDoChannel = 8,
.i_Timer = 1,
.reset = i_APCI1516_Reset,
.di_read = i_APCI1516_Read1DigitalInput,
.di_bits = i_APCI1516_ReadMoreDigitalInput,
.do_config = i_APCI1516_ConfigDigitalOutput,
.do_write = i_APCI1516_WriteDigitalOutput,
.do_bits = i_APCI1516_ReadDigitalOutput,
.timer_config = i_APCI1516_ConfigWatchdog,
.timer_write = i_APCI1516_StartStopWriteWatchdog,
.timer_read = i_APCI1516_ReadWatchdog,
},
};

static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = {
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1001) },
{ 0 }
Expand Down
28 changes: 28 additions & 0 deletions drivers/staging/comedi/drivers/addi_apci_1564.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,34 @@
#include "addi-data/addi_eeprom.c"
#include "addi-data/hwdrv_apci1564.c"

static const struct addi_board boardtypes[] = {
{
.pc_DriverName = "apci1564",
.i_VendorId = PCI_VENDOR_ID_ADDIDATA,
.i_DeviceId = 0x1006,
.i_IorangeBase0 = 128,
.i_IorangeBase1 = APCI1564_ADDRESS_RANGE,
.i_PCIEeprom = ADDIDATA_EEPROM,
.pc_EepromChip = ADDIDATA_93C76,
.i_NbrDiChannel = 32,
.i_NbrDoChannel = 32,
.i_DoMaxdata = 0xffffffff,
.i_Timer = 1,
.interrupt = v_APCI1564_Interrupt,
.reset = i_APCI1564_Reset,
.di_config = i_APCI1564_ConfigDigitalInput,
.di_read = i_APCI1564_Read1DigitalInput,
.di_bits = i_APCI1564_ReadMoreDigitalInput,
.do_config = i_APCI1564_ConfigDigitalOutput,
.do_write = i_APCI1564_WriteDigitalOutput,
.do_bits = i_APCI1564_ReadDigitalOutput,
.do_read = i_APCI1564_ReadInterruptStatus,
.timer_config = i_APCI1564_ConfigTimerCounterWatchdog,
.timer_write = i_APCI1564_StartStopWriteTimerCounterWatchdog,
.timer_read = i_APCI1564_ReadTimerCounterWatchdog,
},
};

static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = {
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1006) },
{ 0 }
Expand Down
28 changes: 28 additions & 0 deletions drivers/staging/comedi/drivers/addi_apci_16xx.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,34 @@
#include "addi-data/addi_eeprom.c"
#include "addi-data/hwdrv_apci16xx.c"

static const struct addi_board boardtypes[] = {
{
.pc_DriverName = "apci1648",
.i_VendorId = PCI_VENDOR_ID_ADDIDATA,
.i_DeviceId = 0x1009,
.i_IorangeBase0 = 128,
.i_PCIEeprom = ADDIDATA_NO_EEPROM,
.i_NbrTTLChannel = 48,
.reset = i_APCI16XX_Reset,
.ttl_config = i_APCI16XX_InsnConfigInitTTLIO,
.ttl_bits = i_APCI16XX_InsnBitsReadTTLIO,
.ttl_read = i_APCI16XX_InsnReadTTLIOAllPortValue,
.ttl_write = i_APCI16XX_InsnBitsWriteTTLIO,
}, {
.pc_DriverName = "apci1696",
.i_VendorId = PCI_VENDOR_ID_ADDIDATA,
.i_DeviceId = 0x100A,
.i_IorangeBase0 = 128,
.i_PCIEeprom = ADDIDATA_NO_EEPROM,
.i_NbrTTLChannel = 96,
.reset = i_APCI16XX_Reset,
.ttl_config = i_APCI16XX_InsnConfigInitTTLIO,
.ttl_bits = i_APCI16XX_InsnBitsReadTTLIO,
.ttl_read = i_APCI16XX_InsnReadTTLIOAllPortValue,
.ttl_write = i_APCI16XX_InsnBitsWriteTTLIO,
},
};

static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = {
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1009) },
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x100a) },
Expand Down
14 changes: 14 additions & 0 deletions drivers/staging/comedi/drivers/addi_apci_1710.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,20 @@ static void fpu_end(void)
#include "addi-data/addi_eeprom.c"
#include "addi-data/hwdrv_APCI1710.c"

static const struct addi_board boardtypes[] = {
{
.pc_DriverName = "apci1710",
.i_VendorId = PCI_VENDOR_ID_ADDIDATA_OLD,
.i_DeviceId = APCI1710_BOARD_DEVICE_ID,
.i_IorangeBase0 = 128,
.i_IorangeBase1 = 8,
.i_IorangeBase2 = 256,
.i_PCIEeprom = ADDIDATA_NO_EEPROM,
.interrupt = v_APCI1710_Interrupt,
.reset = i_APCI1710_Reset,
},
};

static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = {
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA_OLD, APCI1710_BOARD_DEVICE_ID) },
{ 0 }
Expand Down
22 changes: 22 additions & 0 deletions drivers/staging/comedi/drivers/addi_apci_2016.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,28 @@
#include "addi-data/addi_eeprom.c"
#include "addi-data/hwdrv_apci2016.c"

static const struct addi_board boardtypes[] = {
{
.pc_DriverName = "apci2016",
.i_VendorId = PCI_VENDOR_ID_ADDIDATA,
.i_DeviceId = 0x1002,
.i_IorangeBase0 = 128,
.i_IorangeBase1 = APCI2016_ADDRESS_RANGE,
.i_IorangeBase2 = 32,
.i_PCIEeprom = ADDIDATA_EEPROM,
.pc_EepromChip = ADDIDATA_S5920,
.i_NbrDoChannel = 16,
.i_Timer = 1,
.reset = i_APCI2016_Reset,
.do_config = i_APCI2016_ConfigDigitalOutput,
.do_write = i_APCI2016_WriteDigitalOutput,
.do_bits = i_APCI2016_BitsDigitalOutput,
.timer_config = i_APCI2016_ConfigWatchdog,
.timer_write = i_APCI2016_StartStopWriteWatchdog,
.timer_read = i_APCI2016_ReadWatchdog,
},
};

static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = {
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1002) },
{ 0 }
Expand Down
24 changes: 24 additions & 0 deletions drivers/staging/comedi/drivers/addi_apci_2032.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,30 @@
#include "addi-data/addi_eeprom.c"
#include "addi-data/hwdrv_apci2032.c"

static const struct addi_board boardtypes[] = {
{
.pc_DriverName = "apci2032",
.i_VendorId = PCI_VENDOR_ID_ADDIDATA,
.i_DeviceId = 0x1004,
.i_IorangeBase0 = 4,
.i_IorangeBase1 = APCI2032_ADDRESS_RANGE,
.i_PCIEeprom = ADDIDATA_EEPROM,
.pc_EepromChip = ADDIDATA_93C76,
.i_NbrDoChannel = 32,
.i_DoMaxdata = 0xffffffff,
.i_Timer = 1,
.interrupt = v_APCI2032_Interrupt,
.reset = i_APCI2032_Reset,
.do_config = i_APCI2032_ConfigDigitalOutput,
.do_write = i_APCI2032_WriteDigitalOutput,
.do_bits = i_APCI2032_ReadDigitalOutput,
.do_read = i_APCI2032_ReadInterruptStatus,
.timer_config = i_APCI2032_ConfigWatchdog,
.timer_write = i_APCI2032_StartStopWriteWatchdog,
.timer_read = i_APCI2032_ReadWatchdog,
},
};

static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = {
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1004) },
{ 0 }
Expand Down
24 changes: 24 additions & 0 deletions drivers/staging/comedi/drivers/addi_apci_2200.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,30 @@
#include "addi-data/addi_eeprom.c"
#include "addi-data/hwdrv_apci2200.c"

static const struct addi_board boardtypes[] = {
{
.pc_DriverName = "apci2200",
.i_VendorId = PCI_VENDOR_ID_ADDIDATA,
.i_DeviceId = 0x1005,
.i_IorangeBase0 = 4,
.i_IorangeBase1 = APCI2200_ADDRESS_RANGE,
.i_PCIEeprom = ADDIDATA_EEPROM,
.pc_EepromChip = ADDIDATA_93C76,
.i_NbrDiChannel = 8,
.i_NbrDoChannel = 16,
.i_Timer = 1,
.reset = i_APCI2200_Reset,
.di_read = i_APCI2200_Read1DigitalInput,
.di_bits = i_APCI2200_ReadMoreDigitalInput,
.do_config = i_APCI2200_ConfigDigitalOutput,
.do_write = i_APCI2200_WriteDigitalOutput,
.do_bits = i_APCI2200_ReadDigitalOutput,
.timer_config = i_APCI2200_ConfigWatchdog,
.timer_write = i_APCI2200_StartStopWriteWatchdog,
.timer_read = i_APCI2200_ReadWatchdog,
},
};

static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = {
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1005) },
{ 0 }
Expand Down
40 changes: 40 additions & 0 deletions drivers/staging/comedi/drivers/addi_apci_3001.c
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,46 @@
#include "addi-data/addi_eeprom.c"
#include "addi-data/hwdrv_apci3120.c"

static const struct addi_board boardtypes[] = {
{
.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,
},
};

static DEFINE_PCI_DEVICE_TABLE(addi_apci_tbl) = {
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA_OLD, 0x828d) },
{ 0 }
Expand Down
Loading

0 comments on commit c0a053b

Please sign in to comment.