]> rtime.felk.cvut.cz Git - lincan.git/blob - lincan/src/boardlist.c
569aab29ea0ab014ba9e2450de6891c1c1df8541
[lincan.git] / lincan / src / boardlist.c
1 /* boards_list.c
2  * Linux CAN-bus device driver.
3  * Written for new CAN driver version by Pavel Pisa - OCERA team member
4  * email:pisa@cmp.felk.cvut.cz
5  * This software is released under the GPL-License.
6  * Version lincan-0.2  9 Jul 2003
7  */
8
9 #include <linux/autoconf.h>
10 #include <linux/version.h>
11
12 #include "../include/main.h"
13
14 #include ".supported_cards.h"
15
16 #include "../include/pip.h"
17 #include "../include/pccan.h"
18 #include "../include/smartcan.h"
19 #include "../include/pc-i03.h"
20 #include "../include/pcm3680.h"
21 #include "../include/m437.h"
22 #include "../include/template.h"
23 #include "../include/i82527.h"
24 #include "../include/aim104.h"
25 #include "../include/pcccan.h"
26
27 extern int template_register(struct hwspecops_t *hwspecops);
28 extern int pip5_register(struct hwspecops_t *hwspecops);
29 extern int pip6_register(struct hwspecops_t *hwspecops);
30 extern int smartcan_register(struct hwspecops_t *hwspecops);
31 extern int pccanf_register(struct hwspecops_t *hwspecops);
32 extern int pccand_register(struct hwspecops_t *hwspecops);
33 extern int pccanq_register(struct hwspecops_t *hwspecops);
34 extern int nsi_register(struct hwspecops_t *hwspecops);
35 extern int cc104_register(struct hwspecops_t *hwspecops);
36 extern int pci03_register(struct hwspecops_t *hwspecops);
37 extern int pcm3680_register(struct hwspecops_t *hwspecops);
38 extern int aim104_register(struct hwspecops_t *hwspecops);
39 extern int pcccan_register(struct hwspecops_t *hwspecops);
40 extern int ssv_register(struct hwspecops_t *hwspecops);
41 extern int bfadcan_register(struct hwspecops_t *hwspecops);
42 extern int pikronisa_register(struct hwspecops_t *hwspecops);
43 extern int virtual_register(struct hwspecops_t *hwspecops);
44
45 const struct boardtype_t can_boardtypes[]={
46     #ifdef ENABLE_CARD_template
47         {"template", template_register, 1},
48     #endif
49     #ifdef ENABLE_CARD_template
50         {"virtual", virtual_register, 0},
51     #endif
52     #ifdef ENABLE_CARD_pip
53         {"pip5", pip5_register, 1},
54         {"pip6", pip6_register, 1},
55     #endif
56     #ifdef ENABLE_CARD_smartcan
57         {"smartcan", smartcan_register, 1},
58     #endif
59     #ifdef ENABLE_CARD_nsi
60         {"nsican", nsi_register, 1},
61     #endif
62     #ifdef ENABLE_CARD_cc_can104
63         {"cc104", cc104_register, 1},
64     #endif
65     #ifdef ENABLE_CARD_aim104
66         {"aim104", aim104_register, 1},
67     #endif
68     #ifdef ENABLE_CARD_pc_i03
69         {"pc-i03", pci03_register, 1},
70     #endif
71     #ifdef ENABLE_CARD_pcm3680
72         {"pcm3680", pcm3680_register, 2},
73     #endif
74     #ifdef ENABLE_CARD_pccan
75         {"pccan-f", pccanf_register, 1},
76         {"pccan-s", pccanf_register, 1},
77         {"pccan-d", pccand_register, 2},
78         {"pccan-q", pccanq_register, 4},
79     #endif
80     #ifdef ENABLE_CARD_m437
81         {"m437", m437_register, 1},
82     #endif
83     #ifdef ENABLE_CARD_pcccan
84         {"pcccan", pcccan_register, 1},
85     #endif
86     #ifdef ENABLE_CARD_ssv
87         {"ssv", ssv_register, 2},
88     #endif
89     #ifdef ENABLE_CARD_bfadcan
90         {"bfadcan", bfadcan_register, 1},
91     #endif
92     #ifdef ENABLE_CARD_pikronisa
93         {"pikronisa", pikronisa_register, 1},
94     #endif
95         {NULL}
96 };
97
98 const struct boardtype_t* boardtype_find(const char *str)
99 {
100         const struct boardtype_t *brp;
101
102         for(brp=can_boardtypes;brp->boardtype;brp++) {
103                 if(!strcmp(str,brp->boardtype))
104                         return brp;
105         }
106
107         return NULL;
108 }