3 * header file for Comedi PCI drivers
5 * COMEDI - Linux Control and Measurement Device Interface
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 2 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
22 #include <linux/pci.h>
24 #include "comedidev.h"
27 * PCI Vendor IDs not in <linux/pci_ids.h>
29 #define PCI_VENDOR_ID_KOLTER 0x1001
30 #define PCI_VENDOR_ID_ICP 0x104c
31 #define PCI_VENDOR_ID_DT 0x1116
32 #define PCI_VENDOR_ID_IOTECH 0x1616
33 #define PCI_VENDOR_ID_CONTEC 0x1221
34 #define PCI_VENDOR_ID_RTD 0x1435
35 #define PCI_VENDOR_ID_HUMUSOFT 0x186c
37 struct pci_dev *comedi_to_pci_dev(struct comedi_device *);
39 int comedi_pci_enable(struct comedi_device *);
40 void comedi_pci_disable(struct comedi_device *);
41 void comedi_pci_detach(struct comedi_device *);
43 int comedi_pci_auto_config(struct pci_dev *, struct comedi_driver *,
44 unsigned long context);
45 void comedi_pci_auto_unconfig(struct pci_dev *);
47 int comedi_pci_driver_register(struct comedi_driver *, struct pci_driver *);
48 void comedi_pci_driver_unregister(struct comedi_driver *, struct pci_driver *);
51 * module_comedi_pci_driver() - Helper macro for registering a comedi PCI driver
52 * @__comedi_driver: comedi_driver struct
53 * @__pci_driver: pci_driver struct
55 * Helper macro for comedi PCI drivers which do not do anything special
56 * in module init/exit. This eliminates a lot of boilerplate. Each
57 * module may only use this macro once, and calling it replaces
58 * module_init() and module_exit()
60 #define module_comedi_pci_driver(__comedi_driver, __pci_driver) \
61 module_driver(__comedi_driver, comedi_pci_driver_register, \
62 comedi_pci_driver_unregister, &(__pci_driver))
64 #endif /* _COMEDI_PCI_H */