Commit | Line | Data |
---|---|---|
3d41c443 HS |
1 | #include "../comedidev.h" |
2 | #include "comedi_fc.h" | |
bf36f012 | 3 | #include "amcc_s5933.h" |
3d41c443 HS |
4 | |
5 | #include "addi-data/addi_common.h" | |
3d41c443 | 6 | |
bf6a1578 HS |
7 | #include "addi-data/addi_eeprom.c" |
8 | #include "addi-data/hwdrv_apci16xx.c" | |
20a22b70 | 9 | #include "addi-data/addi_common.c" |
317285d7 | 10 | |
20a22b70 | 11 | static const struct addi_board apci16xx_boardtypes[] = { |
c0a053b8 HS |
12 | { |
13 | .pc_DriverName = "apci1648", | |
14 | .i_VendorId = PCI_VENDOR_ID_ADDIDATA, | |
15 | .i_DeviceId = 0x1009, | |
16 | .i_IorangeBase0 = 128, | |
17 | .i_PCIEeprom = ADDIDATA_NO_EEPROM, | |
18 | .i_NbrTTLChannel = 48, | |
19 | .reset = i_APCI16XX_Reset, | |
20 | .ttl_config = i_APCI16XX_InsnConfigInitTTLIO, | |
21 | .ttl_bits = i_APCI16XX_InsnBitsReadTTLIO, | |
22 | .ttl_read = i_APCI16XX_InsnReadTTLIOAllPortValue, | |
23 | .ttl_write = i_APCI16XX_InsnBitsWriteTTLIO, | |
24 | }, { | |
25 | .pc_DriverName = "apci1696", | |
26 | .i_VendorId = PCI_VENDOR_ID_ADDIDATA, | |
27 | .i_DeviceId = 0x100A, | |
28 | .i_IorangeBase0 = 128, | |
29 | .i_PCIEeprom = ADDIDATA_NO_EEPROM, | |
30 | .i_NbrTTLChannel = 96, | |
31 | .reset = i_APCI16XX_Reset, | |
32 | .ttl_config = i_APCI16XX_InsnConfigInitTTLIO, | |
33 | .ttl_bits = i_APCI16XX_InsnBitsReadTTLIO, | |
34 | .ttl_read = i_APCI16XX_InsnReadTTLIOAllPortValue, | |
35 | .ttl_write = i_APCI16XX_InsnBitsWriteTTLIO, | |
36 | }, | |
37 | }; | |
38 | ||
20a22b70 HS |
39 | static struct comedi_driver apci16xx_driver = { |
40 | .driver_name = "addi_apci_16xx", | |
41 | .module = THIS_MODULE, | |
92cba8f3 | 42 | .auto_attach = addi_auto_attach, |
20a22b70 HS |
43 | .detach = i_ADDI_Detach, |
44 | .num_names = ARRAY_SIZE(apci16xx_boardtypes), | |
45 | .board_name = &apci16xx_boardtypes[0].pc_DriverName, | |
46 | .offset = sizeof(struct addi_board), | |
47 | }; | |
48 | ||
a690b7e5 | 49 | static int apci16xx_pci_probe(struct pci_dev *dev, |
20a22b70 HS |
50 | const struct pci_device_id *ent) |
51 | { | |
52 | return comedi_pci_auto_config(dev, &apci16xx_driver); | |
53 | } | |
54 | ||
55 | static void __devexit apci16xx_pci_remove(struct pci_dev *dev) | |
56 | { | |
57 | comedi_pci_auto_unconfig(dev); | |
58 | } | |
59 | ||
60 | static DEFINE_PCI_DEVICE_TABLE(apci16xx_pci_table) = { | |
317285d7 HS |
61 | { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1009) }, |
62 | { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x100a) }, | |
63 | { 0 } | |
64 | }; | |
20a22b70 | 65 | MODULE_DEVICE_TABLE(pci, apci16xx_pci_table); |
317285d7 | 66 | |
20a22b70 HS |
67 | static struct pci_driver apci16xx_pci_driver = { |
68 | .name = "addi_apci_16xx", | |
69 | .id_table = apci16xx_pci_table, | |
70 | .probe = apci16xx_pci_probe, | |
a471eace | 71 | .remove = apci16xx_pci_remove, |
20a22b70 HS |
72 | }; |
73 | module_comedi_pci_driver(apci16xx_driver, apci16xx_pci_driver); | |
90f703d3 AT |
74 | |
75 | MODULE_AUTHOR("Comedi http://www.comedi.org"); | |
76 | MODULE_DESCRIPTION("Comedi low-level driver"); | |
77 | MODULE_LICENSE("GPL"); |