comedi_pci.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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. #ifndef _COMEDI_PCI_H
  19. #define _COMEDI_PCI_H
  20. #include <linux/pci.h>
  21. #include "comedidev.h"
  22. /*
  23. * PCI Vendor IDs not in <linux/pci_ids.h>
  24. */
  25. #define PCI_VENDOR_ID_KOLTER 0x1001
  26. #define PCI_VENDOR_ID_ICP 0x104c
  27. #define PCI_VENDOR_ID_DT 0x1116
  28. #define PCI_VENDOR_ID_IOTECH 0x1616
  29. #define PCI_VENDOR_ID_CONTEC 0x1221
  30. #define PCI_VENDOR_ID_RTD 0x1435
  31. #define PCI_VENDOR_ID_HUMUSOFT 0x186c
  32. struct pci_dev *comedi_to_pci_dev(struct comedi_device *);
  33. int comedi_pci_enable(struct comedi_device *);
  34. void comedi_pci_disable(struct comedi_device *);
  35. void comedi_pci_detach(struct comedi_device *);
  36. int comedi_pci_auto_config(struct pci_dev *, struct comedi_driver *,
  37. unsigned long context);
  38. void comedi_pci_auto_unconfig(struct pci_dev *);
  39. int comedi_pci_driver_register(struct comedi_driver *, struct pci_driver *);
  40. void comedi_pci_driver_unregister(struct comedi_driver *, struct pci_driver *);
  41. /**
  42. * module_comedi_pci_driver() - Helper macro for registering a comedi PCI driver
  43. * @__comedi_driver: comedi_driver struct
  44. * @__pci_driver: pci_driver struct
  45. *
  46. * Helper macro for comedi PCI drivers which do not do anything special
  47. * in module init/exit. This eliminates a lot of boilerplate. Each
  48. * module may only use this macro once, and calling it replaces
  49. * module_init() and module_exit()
  50. */
  51. #define module_comedi_pci_driver(__comedi_driver, __pci_driver) \
  52. module_driver(__comedi_driver, comedi_pci_driver_register, \
  53. comedi_pci_driver_unregister, &(__pci_driver))
  54. #endif /* _COMEDI_PCI_H */