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#define ADDIDATA_WATCHDOG 2 /* Or shold it be something else */ 11 12#include "addi-data/addi_eeprom.c" 13#include "addi-data/hwdrv_apci035.c" 14#include "addi-data/addi_common.c" 15 16static const struct addi_board apci035_boardtypes[] = { 17 { 18 .pc_DriverName = "apci035", 19 .i_IorangeBase1 = APCI035_ADDRESS_RANGE, 20 .i_PCIEeprom = 1, 21 .pc_EepromChip = "S5920", 22 .i_NbrAiChannel = 16, 23 .i_NbrAiChannelDiff = 8, 24 .i_AiChannelList = 16, 25 .i_AiMaxdata = 0xff, 26 .pr_AiRangelist = &range_apci035_ai, 27 .i_Timer = 1, 28 .ui_MinAcquisitiontimeNs = 10000, 29 .ui_MinDelaytimeNs = 100000, 30 .interrupt = apci035_interrupt, 31 .reset = apci035_reset, 32 .ai_config = apci035_ai_config, 33 .ai_read = apci035_ai_read, 34 .timer_config = apci035_timer_config, 35 .timer_write = apci035_timer_write, 36 .timer_read = apci035_timer_read, 37 }, 38}; 39 40static int apci035_auto_attach(struct comedi_device *dev, 41 unsigned long context) 42{ 43 dev->board_ptr = &apci035_boardtypes[0]; 44 45 return addi_auto_attach(dev, context); 46} 47 48static struct comedi_driver apci035_driver = { 49 .driver_name = "addi_apci_035", 50 .module = THIS_MODULE, 51 .auto_attach = apci035_auto_attach, 52 .detach = i_ADDI_Detach, 53}; 54 55static int apci035_pci_probe(struct pci_dev *dev, 56 const struct pci_device_id *id) 57{ 58 return comedi_pci_auto_config(dev, &apci035_driver, id->driver_data); 59} 60 61static const struct pci_device_id apci035_pci_table[] = { 62 { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x0300) }, 63 { 0 } 64}; 65MODULE_DEVICE_TABLE(pci, apci035_pci_table); 66 67static struct pci_driver apci035_pci_driver = { 68 .name = "addi_apci_035", 69 .id_table = apci035_pci_table, 70 .probe = apci035_pci_probe, 71 .remove = comedi_pci_auto_unconfig, 72}; 73module_comedi_pci_driver(apci035_driver, apci035_pci_driver); 74 75MODULE_AUTHOR("Comedi http://www.comedi.org"); 76MODULE_DESCRIPTION("Comedi low-level driver"); 77MODULE_LICENSE("GPL"); 78