1 /* SPDX-License-Identifier: GPL-2.0+ */
4 * header file for Comedi PCI drivers
6 * COMEDI - Linux Control and Measurement Device Interface
7 * Copyright (C) 1997-2000 David A. Schleef <ds@schleef.org>
13 #include <linux/pci.h>
15 #include "comedidev.h"
18 * PCI Vendor IDs not in <linux/pci_ids.h>
20 #define PCI_VENDOR_ID_KOLTER 0x1001
21 #define PCI_VENDOR_ID_ICP 0x104c
22 #define PCI_VENDOR_ID_DT 0x1116
23 #define PCI_VENDOR_ID_IOTECH 0x1616
24 #define PCI_VENDOR_ID_CONTEC 0x1221
25 #define PCI_VENDOR_ID_RTD 0x1435
26 #define PCI_VENDOR_ID_HUMUSOFT 0x186c
28 struct pci_dev *comedi_to_pci_dev(struct comedi_device *dev);
30 int comedi_pci_enable(struct comedi_device *dev);
31 void comedi_pci_disable(struct comedi_device *dev);
32 void comedi_pci_detach(struct comedi_device *dev);
34 int comedi_pci_auto_config(struct pci_dev *pcidev, struct comedi_driver *driver,
35 unsigned long context);
36 void comedi_pci_auto_unconfig(struct pci_dev *pcidev);
38 int comedi_pci_driver_register(struct comedi_driver *comedi_driver,
39 struct pci_driver *pci_driver);
40 void comedi_pci_driver_unregister(struct comedi_driver *comedi_driver,
41 struct pci_driver *pci_driver);
44 * module_comedi_pci_driver() - Helper macro for registering a comedi PCI driver
45 * @__comedi_driver: comedi_driver struct
46 * @__pci_driver: pci_driver struct
48 * Helper macro for comedi PCI drivers which do not do anything special
49 * in module init/exit. This eliminates a lot of boilerplate. Each
50 * module may only use this macro once, and calling it replaces
51 * module_init() and module_exit()
53 #define module_comedi_pci_driver(__comedi_driver, __pci_driver) \
54 module_driver(__comedi_driver, comedi_pci_driver_register, \
55 comedi_pci_driver_unregister, &(__pci_driver))
57 #endif /* _COMEDI_PCI_H */