]>
Commit | Line | Data |
---|---|---|
0bc5b2ba | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
7ff7e4c2 | 2 | /* |
d94e5c63 IA |
3 | * comedi/drivers/amplc_dio.h |
4 | * | |
5 | * Header for amplc_dio200.c, amplc_dio200_common.c and | |
6 | * amplc_dio200_pci.c. | |
7 | * | |
8 | * Copyright (C) 2005-2013 MEV Ltd. <http://www.mev.co.uk/> | |
9 | * | |
10 | * COMEDI - Linux Control and Measurement Device Interface | |
11 | * Copyright (C) 1998,2000 David A. Schleef <ds@schleef.org> | |
d94e5c63 | 12 | */ |
7ff7e4c2 IA |
13 | |
14 | #ifndef AMPLC_DIO200_H_INCLUDED | |
15 | #define AMPLC_DIO200_H_INCLUDED | |
16 | ||
8ea66632 IA |
17 | #include <linux/types.h> |
18 | ||
19 | struct comedi_device; | |
20 | ||
7ff7e4c2 IA |
21 | /* |
22 | * Subdevice types. | |
23 | */ | |
24 | enum dio200_sdtype { sd_none, sd_intr, sd_8255, sd_8254, sd_timer }; | |
25 | ||
26 | #define DIO200_MAX_SUBDEVS 8 | |
27 | #define DIO200_MAX_ISNS 6 | |
28 | ||
f6ce0950 HS |
29 | struct dio200_board { |
30 | const char *name; | |
31 | unsigned char mainbar; | |
7ff7e4c2 IA |
32 | unsigned short n_subdevs; /* number of subdevices */ |
33 | unsigned char sdtype[DIO200_MAX_SUBDEVS]; /* enum dio200_sdtype */ | |
34 | unsigned char sdinfo[DIO200_MAX_SUBDEVS]; /* depends on sdtype */ | |
46fb63b3 GB |
35 | unsigned int has_int_sce:1; /* has interrupt enable/status reg */ |
36 | unsigned int has_clk_gat_sce:1; /* has clock/gate selection registers */ | |
37 | unsigned int is_pcie:1; /* has enhanced features */ | |
7ff7e4c2 IA |
38 | }; |
39 | ||
7ff7e4c2 IA |
40 | int amplc_dio200_common_attach(struct comedi_device *dev, unsigned int irq, |
41 | unsigned long req_irq_flags); | |
42 | ||
7ff7e4c2 IA |
43 | /* Used by initialization of PCIe boards. */ |
44 | void amplc_dio200_set_enhance(struct comedi_device *dev, unsigned char val); | |
45 | ||
46 | #endif |