1 /* SPDX-License-Identifier: GPL-2.0+ */
4 * header file for Comedi PCMCIA drivers
6 * COMEDI - Linux Control and Measurement Device Interface
7 * Copyright (C) 1997-2000 David A. Schleef <ds@schleef.org>
10 #ifndef _COMEDI_PCMCIA_H
11 #define _COMEDI_PCMCIA_H
13 #include <pcmcia/cistpl.h>
14 #include <pcmcia/ds.h>
16 #include "comedidev.h"
18 struct pcmcia_device *comedi_to_pcmcia_dev(struct comedi_device *dev);
20 int comedi_pcmcia_enable(struct comedi_device *dev,
21 int (*conf_check)(struct pcmcia_device *p_dev,
23 void comedi_pcmcia_disable(struct comedi_device *dev);
25 int comedi_pcmcia_auto_config(struct pcmcia_device *link,
26 struct comedi_driver *driver);
27 void comedi_pcmcia_auto_unconfig(struct pcmcia_device *link);
29 int comedi_pcmcia_driver_register(struct comedi_driver *comedi_driver,
30 struct pcmcia_driver *pcmcia_driver);
31 void comedi_pcmcia_driver_unregister(struct comedi_driver *comedi_driver,
32 struct pcmcia_driver *pcmcia_driver);
35 * module_comedi_pcmcia_driver() - Helper macro for registering a comedi
37 * @__comedi_driver: comedi_driver struct
38 * @__pcmcia_driver: pcmcia_driver struct
40 * Helper macro for comedi PCMCIA drivers which do not do anything special
41 * in module init/exit. This eliminates a lot of boilerplate. Each
42 * module may only use this macro once, and calling it replaces
43 * module_init() and module_exit()
45 #define module_comedi_pcmcia_driver(__comedi_driver, __pcmcia_driver) \
46 module_driver(__comedi_driver, comedi_pcmcia_driver_register, \
47 comedi_pcmcia_driver_unregister, &(__pcmcia_driver))
49 #endif /* _COMEDI_PCMCIA_H */