1 #include "../comedidev.h"
3 #include "amcc_s5933.h"
5 #include "addi-data/addi_common.h"
7 #include "addi-data/addi_eeprom.c"
8 #include "addi-data/hwdrv_apci3501.c"
9 #include "addi-data/addi_common.c"
11 static const struct addi_board apci3501_boardtypes[] = {
13 .pc_DriverName = "apci3501",
14 .i_VendorId = PCI_VENDOR_ID_ADDIDATA,
17 .i_IorangeBase1 = APCI3501_ADDRESS_RANGE,
18 .i_PCIEeprom = ADDIDATA_EEPROM,
19 .pc_EepromChip = ADDIDATA_S5933,
21 .pr_AoRangelist = &range_apci3501_ao,
26 .interrupt = v_APCI3501_Interrupt,
27 .reset = i_APCI3501_Reset,
28 .ao_config = i_APCI3501_ConfigAnalogOutput,
29 .ao_write = i_APCI3501_WriteAnalogOutput,
30 .di_bits = apci3501_di_insn_bits,
31 .do_bits = apci3501_do_insn_bits,
32 .timer_config = i_APCI3501_ConfigTimerCounterWatchdog,
33 .timer_write = i_APCI3501_StartStopWriteTimerCounterWatchdog,
34 .timer_read = i_APCI3501_ReadTimerCounterWatchdog,
38 static DEFINE_PCI_DEVICE_TABLE(apci3501_pci_table) = {
39 { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x3001) },
42 MODULE_DEVICE_TABLE(pci, apci3501_pci_table);
44 static struct comedi_driver apci3501_driver = {
45 .driver_name = "addi_apci_3501",
46 .module = THIS_MODULE,
47 .auto_attach = addi_auto_attach,
48 .detach = i_ADDI_Detach,
49 .num_names = ARRAY_SIZE(apci3501_boardtypes),
50 .board_name = &apci3501_boardtypes[0].pc_DriverName,
51 .offset = sizeof(struct addi_board),
54 static int __devinit apci3501_pci_probe(struct pci_dev *dev,
55 const struct pci_device_id *ent)
57 return comedi_pci_auto_config(dev, &apci3501_driver);
60 static void __devexit apci3501_pci_remove(struct pci_dev *dev)
62 comedi_pci_auto_unconfig(dev);
65 static struct pci_driver apci3501_pci_driver = {
66 .name = "addi_apci_3501",
67 .id_table = apci3501_pci_table,
68 .probe = apci3501_pci_probe,
69 .remove = __devexit_p(apci3501_pci_remove),
71 module_comedi_pci_driver(apci3501_driver, apci3501_pci_driver);
73 MODULE_AUTHOR("Comedi http://www.comedi.org");
74 MODULE_DESCRIPTION("Comedi low-level driver");
75 MODULE_LICENSE("GPL");