Version:  2.0.40 2.2.26 2.4.37 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 3.16

Linux/drivers/staging/comedi/drivers/addi_apci_1500.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_apci1500.c"
 12 #include "addi-data/addi_common.c"
 13 
 14 static const struct addi_board apci1500_boardtypes[] = {
 15         {
 16                 .pc_DriverName          = "apci1500",
 17                 .i_IorangeBase1         = APCI1500_ADDRESS_RANGE,
 18                 .i_PCIEeprom            = ADDIDATA_NO_EEPROM,
 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 
 39 static 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 
 47 static 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 
 54 static 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 
 60 static const struct pci_device_id apci1500_pci_table[] = {
 61         { PCI_DEVICE(PCI_VENDOR_ID_AMCC, 0x80fc) },
 62         { 0 }
 63 };
 64 MODULE_DEVICE_TABLE(pci, apci1500_pci_table);
 65 
 66 static 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 };
 72 module_comedi_pci_driver(apci1500_driver, apci1500_pci_driver);
 73 
 74 MODULE_AUTHOR("Comedi http://www.comedi.org");
 75 MODULE_DESCRIPTION("ADDI-DATA APCI-1500, 16 channel DI / 16 channel DO boards");
 76 MODULE_LICENSE("GPL");
 77 

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