3 * header file for Comedi PCI drivers
5 * COMEDI - Linux Control and Measurement Device Interface
6 * Copyright (C) 1997-2000 David A. Schleef <ds@schleef.org>
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 *dev);
39 int comedi_pci_enable(struct comedi_device *dev);
40 void comedi_pci_disable(struct comedi_device *dev);
41 void comedi_pci_detach(struct comedi_device *dev);
43 int comedi_pci_auto_config(struct pci_dev *pcidev, struct comedi_driver *driver,
44 unsigned long context);
45 void comedi_pci_auto_unconfig(struct pci_dev *pcidev);
47 int comedi_pci_driver_register(struct comedi_driver *comedi_driver,
48 struct pci_driver *pci_driver);
49 void comedi_pci_driver_unregister(struct comedi_driver *comedi_driver,
50 struct pci_driver *pci_driver);
53 * module_comedi_pci_driver() - Helper macro for registering a comedi PCI driver
54 * @__comedi_driver: comedi_driver struct
55 * @__pci_driver: pci_driver struct
57 * Helper macro for comedi PCI drivers which do not do anything special
58 * in module init/exit. This eliminates a lot of boilerplate. Each
59 * module may only use this macro once, and calling it replaces
60 * module_init() and module_exit()
62 #define module_comedi_pci_driver(__comedi_driver, __pci_driver) \
63 module_driver(__comedi_driver, comedi_pci_driver_register, \
64 comedi_pci_driver_unregister, &(__pci_driver))
66 #endif /* _COMEDI_PCI_H */