1/* 2 * comedi_pci.h 3 * header file for Comedi PCI drivers 4 * 5 * COMEDI - Linux Control and Measurement Device Interface 6 * Copyright (C) 1997-2000 David A. Schleef <ds@schleef.org> 7 * 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. 12 * 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. 17 */ 18 19#ifndef _COMEDI_PCI_H 20#define _COMEDI_PCI_H 21 22#include <linux/pci.h> 23 24#include "comedidev.h" 25 26/* 27 * PCI Vendor IDs not in <linux/pci_ids.h> 28 */ 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 36 37struct pci_dev *comedi_to_pci_dev(struct comedi_device *); 38 39int comedi_pci_enable(struct comedi_device *); 40void comedi_pci_disable(struct comedi_device *); 41void comedi_pci_detach(struct comedi_device *); 42 43int comedi_pci_auto_config(struct pci_dev *, struct comedi_driver *, 44 unsigned long context); 45void comedi_pci_auto_unconfig(struct pci_dev *); 46 47int comedi_pci_driver_register(struct comedi_driver *, struct pci_driver *); 48void comedi_pci_driver_unregister(struct comedi_driver *, struct pci_driver *); 49 50/** 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 54 * 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() 59 */ 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)) 63 64#endif /* _COMEDI_PCI_H */ 65