1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
|
#include "../comedidev.h"
#include "comedi_fc.h"
#include "amcc_s5933.h"
#include "addi-data/addi_common.h"
#include "addi-data/addi_eeprom.c"
#include "addi-data/hwdrv_apci16xx.c"
#include "addi-data/addi_common.c"
static const struct addi_board apci16xx_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 struct comedi_driver apci16xx_driver = {
.driver_name = "addi_apci_16xx",
.module = THIS_MODULE,
.auto_attach = addi_auto_attach,
.detach = i_ADDI_Detach,
.num_names = ARRAY_SIZE(apci16xx_boardtypes),
.board_name = &apci16xx_boardtypes[0].pc_DriverName,
.offset = sizeof(struct addi_board),
};
static int __devinit apci16xx_pci_probe(struct pci_dev *dev,
const struct pci_device_id *ent)
{
return comedi_pci_auto_config(dev, &apci16xx_driver);
}
static void __devexit apci16xx_pci_remove(struct pci_dev *dev)
{
comedi_pci_auto_unconfig(dev);
}
static DEFINE_PCI_DEVICE_TABLE(apci16xx_pci_table) = {
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1009) },
{ PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x100a) },
{ 0 }
};
MODULE_DEVICE_TABLE(pci, apci16xx_pci_table);
static struct pci_driver apci16xx_pci_driver = {
.name = "addi_apci_16xx",
.id_table = apci16xx_pci_table,
.probe = apci16xx_pci_probe,
.remove = apci16xx_pci_remove,
};
module_comedi_pci_driver(apci16xx_driver, apci16xx_pci_driver);
MODULE_AUTHOR("Comedi http://www.comedi.org");
MODULE_DESCRIPTION("Comedi low-level driver");
MODULE_LICENSE("GPL");
|