1#include <linux/module.h> 2#include <linux/pci.h> 3 4#include "../comedidev.h" 5#include "comedi_fc.h" 6#include "amcc_s5933.h" 7 8#include "addi-data/addi_common.h" 9 10#include "addi-data/addi_eeprom.c" 11#include "addi-data/hwdrv_apci1500.c" 12#include "addi-data/addi_common.c" 13 14static const struct addi_board apci1500_boardtypes[] = { 15 { 16 .pc_DriverName = "apci1500", 17 .i_IorangeBase1 = APCI1500_ADDRESS_RANGE, 18 .i_PCIEeprom = 0, 19 .i_NbrDiChannel = 16, 20 .i_NbrDoChannel = 16, 21 .i_DoMaxdata = 0xffff, 22 .i_Timer = 1, 23 .interrupt = apci1500_interrupt, 24 .reset = apci1500_reset, 25 .di_config = apci1500_di_config, 26 .di_read = apci1500_di_read, 27 .di_write = apci1500_di_write, 28 .di_bits = apci1500_di_insn_bits, 29 .do_config = apci1500_do_config, 30 .do_write = apci1500_do_write, 31 .do_bits = apci1500_do_bits, 32 .timer_config = apci1500_timer_config, 33 .timer_write = apci1500_timer_write, 34 .timer_read = apci1500_timer_read, 35 .timer_bits = apci1500_timer_bits, 36 }, 37}; 38 39static int apci1500_auto_attach(struct comedi_device *dev, 40 unsigned long context) 41{ 42 dev->board_ptr = &apci1500_boardtypes[0]; 43 44 return addi_auto_attach(dev, context); 45} 46 47static struct comedi_driver apci1500_driver = { 48 .driver_name = "addi_apci_1500", 49 .module = THIS_MODULE, 50 .auto_attach = apci1500_auto_attach, 51 .detach = i_ADDI_Detach, 52}; 53 54static int apci1500_pci_probe(struct pci_dev *dev, 55 const struct pci_device_id *id) 56{ 57 return comedi_pci_auto_config(dev, &apci1500_driver, id->driver_data); 58} 59 60static const struct pci_device_id apci1500_pci_table[] = { 61 { PCI_DEVICE(PCI_VENDOR_ID_AMCC, 0x80fc) }, 62 { 0 } 63}; 64MODULE_DEVICE_TABLE(pci, apci1500_pci_table); 65 66static struct pci_driver apci1500_pci_driver = { 67 .name = "addi_apci_1500", 68 .id_table = apci1500_pci_table, 69 .probe = apci1500_pci_probe, 70 .remove = comedi_pci_auto_unconfig, 71}; 72module_comedi_pci_driver(apci1500_driver, apci1500_pci_driver); 73 74MODULE_AUTHOR("Comedi http://www.comedi.org"); 75MODULE_DESCRIPTION("ADDI-DATA APCI-1500, 16 channel DI / 16 channel DO boards"); 76MODULE_LICENSE("GPL"); 77