Version:  2.0.40 2.2.26 2.4.37 2.6.39 3.0 3.1 3.2 3.3 3.4 3.5 3.6 3.7 3.8 3.9 3.10 3.11 3.12 3.13 3.14 3.15

Linux/drivers/staging/comedi/drivers/addi_apci_1564.c

  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_apci1564.c"
 12 #include "addi-data/addi_common.c"
 13 
 14 static const struct addi_board apci1564_boardtypes[] = {
 15         {
 16                 .pc_DriverName          = "apci1564",
 17                 .i_IorangeBase1         = APCI1564_ADDRESS_RANGE,
 18                 .i_PCIEeprom            = ADDIDATA_EEPROM,
 19                 .pc_EepromChip          = ADDIDATA_93C76,
 20                 .i_NbrDiChannel         = 32,
 21                 .i_NbrDoChannel         = 32,
 22                 .i_DoMaxdata            = 0xffffffff,
 23                 .i_Timer                = 1,
 24                 .interrupt              = apci1564_interrupt,
 25                 .reset                  = apci1564_reset,
 26                 .di_config              = apci1564_di_config,
 27                 .di_bits                = apci1564_di_insn_bits,
 28                 .do_config              = apci1564_do_config,
 29                 .do_bits                = apci1564_do_insn_bits,
 30                 .do_read                = apci1564_do_read,
 31                 .timer_config           = apci1564_timer_config,
 32                 .timer_write            = apci1564_timer_write,
 33                 .timer_read             = apci1564_timer_read,
 34         },
 35 };
 36 
 37 static int apci1564_auto_attach(struct comedi_device *dev,
 38                                 unsigned long context)
 39 {
 40         dev->board_ptr = &apci1564_boardtypes[0];
 41 
 42         return addi_auto_attach(dev, context);
 43 }
 44 
 45 static struct comedi_driver apci1564_driver = {
 46         .driver_name    = "addi_apci_1564",
 47         .module         = THIS_MODULE,
 48         .auto_attach    = apci1564_auto_attach,
 49         .detach         = i_ADDI_Detach,
 50 };
 51 
 52 static int apci1564_pci_probe(struct pci_dev *dev,
 53                               const struct pci_device_id *id)
 54 {
 55         return comedi_pci_auto_config(dev, &apci1564_driver, id->driver_data);
 56 }
 57 
 58 static const struct pci_device_id apci1564_pci_table[] = {
 59         { PCI_DEVICE(PCI_VENDOR_ID_ADDIDATA, 0x1006) },
 60         { 0 }
 61 };
 62 MODULE_DEVICE_TABLE(pci, apci1564_pci_table);
 63 
 64 static struct pci_driver apci1564_pci_driver = {
 65         .name           = "addi_apci_1564",
 66         .id_table       = apci1564_pci_table,
 67         .probe          = apci1564_pci_probe,
 68         .remove         = comedi_pci_auto_unconfig,
 69 };
 70 module_comedi_pci_driver(apci1564_driver, apci1564_pci_driver);
 71 
 72 MODULE_AUTHOR("Comedi http://www.comedi.org");
 73 MODULE_DESCRIPTION("Comedi low-level driver");
 74 MODULE_LICENSE("GPL");
 75 

This page was automatically generated by LXR 0.3.1 (source).  •  Linux is a registered trademark of Linus Torvalds  •  Contact us