Ian Abbott | 00f457b | 2015-01-30 09:57:17 +0000 | [diff] [blame] | 1 | /* |
| 2 | * comedi_pcmcia.h |
| 3 | * header file for Comedi PCMCIA 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_PCMCIA_H |
| 20 | #define _COMEDI_PCMCIA_H |
| 21 | |
| 22 | #include <pcmcia/cistpl.h> |
| 23 | #include <pcmcia/ds.h> |
| 24 | |
| 25 | #include "comedidev.h" |
| 26 | |
Ian Abbott | aedd2e8 | 2015-01-30 09:57:26 +0000 | [diff] [blame] | 27 | struct pcmcia_device *comedi_to_pcmcia_dev(struct comedi_device *); |
| 28 | |
| 29 | int comedi_pcmcia_enable(struct comedi_device *, |
| 30 | int (*conf_check)(struct pcmcia_device *, void *)); |
| 31 | void comedi_pcmcia_disable(struct comedi_device *); |
| 32 | |
| 33 | int comedi_pcmcia_auto_config(struct pcmcia_device *, struct comedi_driver *); |
| 34 | void comedi_pcmcia_auto_unconfig(struct pcmcia_device *); |
| 35 | |
| 36 | int comedi_pcmcia_driver_register(struct comedi_driver *, |
| 37 | struct pcmcia_driver *); |
| 38 | void comedi_pcmcia_driver_unregister(struct comedi_driver *, |
| 39 | struct pcmcia_driver *); |
| 40 | |
| 41 | /** |
Pablo G. Gallardo | 0e05c02 | 2016-02-04 21:43:14 -0200 | [diff] [blame] | 42 | * module_comedi_pcmcia_driver() - Helper macro for registering a comedi |
| 43 | * PCMCIA driver |
Ian Abbott | aedd2e8 | 2015-01-30 09:57:26 +0000 | [diff] [blame] | 44 | * @__comedi_driver: comedi_driver struct |
| 45 | * @__pcmcia_driver: pcmcia_driver struct |
| 46 | * |
| 47 | * Helper macro for comedi PCMCIA drivers which do not do anything special |
| 48 | * in module init/exit. This eliminates a lot of boilerplate. Each |
| 49 | * module may only use this macro once, and calling it replaces |
| 50 | * module_init() and module_exit() |
Ian Abbott | 00f457b | 2015-01-30 09:57:17 +0000 | [diff] [blame] | 51 | */ |
Ian Abbott | aedd2e8 | 2015-01-30 09:57:26 +0000 | [diff] [blame] | 52 | #define module_comedi_pcmcia_driver(__comedi_driver, __pcmcia_driver) \ |
| 53 | module_driver(__comedi_driver, comedi_pcmcia_driver_register, \ |
| 54 | comedi_pcmcia_driver_unregister, &(__pcmcia_driver)) |
Ian Abbott | 00f457b | 2015-01-30 09:57:17 +0000 | [diff] [blame] | 55 | |
| 56 | #endif /* _COMEDI_PCMCIA_H */ |