]> rtime.felk.cvut.cz Git - lincan.git/blob - lincan/src/boardlist.c
f0b7dff3fb58e91626155d406443673dd4726a3d
[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 "../include/can.h"
10 #include "../include/can_sysdep.h"
11 #include "../include/main.h"
12
13 #include "lincan_config.h"
14
15 extern int template_register(struct hwspecops_t *hwspecops);
16 extern int virtual_register(struct hwspecops_t *hwspecops);
17 extern int pip5_register(struct hwspecops_t *hwspecops);
18 extern int pip6_register(struct hwspecops_t *hwspecops);
19 extern int m437_register(struct hwspecops_t *hwspecops);
20 extern int smartcan_register(struct hwspecops_t *hwspecops);
21 extern int pccanf_register(struct hwspecops_t *hwspecops);
22 extern int pccand_register(struct hwspecops_t *hwspecops);
23 extern int pccanq_register(struct hwspecops_t *hwspecops);
24 extern int kv_pcican_register(struct hwspecops_t *hwspecops);
25 extern int nsi_register(struct hwspecops_t *hwspecops);
26 extern int cc104_register(struct hwspecops_t *hwspecops);
27 extern int pci03_register(struct hwspecops_t *hwspecops);
28 extern int pcm3680_register(struct hwspecops_t *hwspecops);
29 extern int aim104_register(struct hwspecops_t *hwspecops);
30 extern int pcccan_register(struct hwspecops_t *hwspecops);
31 extern int ssv_register(struct hwspecops_t *hwspecops);
32 extern int bfadcan_register(struct hwspecops_t *hwspecops);
33 extern int pikronisa_register(struct hwspecops_t *hwspecops);
34 extern int msmcan_register(struct hwspecops_t *hwspecops);
35 extern int unican_register(struct hwspecops_t *hwspecops);
36
37 const struct boardtype_t can_boardtypes[]={
38     #ifdef CONFIG_OC_LINCAN_CARD_template
39         {"template", template_register, 1},
40     #endif
41     #ifdef CONFIG_OC_LINCAN_CARD_template
42         {"virtual", virtual_register, 0},
43     #endif
44     #ifdef CONFIG_OC_LINCAN_CARD_pip
45         {"pip5", pip5_register, 1},
46         {"pip6", pip6_register, 1},
47     #endif
48     #ifdef CONFIG_OC_LINCAN_CARD_smartcan
49         {"smartcan", smartcan_register, 1},
50     #endif
51     #ifdef CONFIG_OC_LINCAN_CARD_nsi
52         {"nsican", nsi_register, 1},
53     #endif
54     #ifdef CONFIG_OC_LINCAN_CARD_cc_can104
55         {"cc104", cc104_register, 1},
56     #endif
57     #ifdef CONFIG_OC_LINCAN_CARD_aim104
58         {"aim104", aim104_register, 1},
59     #endif
60     #ifdef CONFIG_OC_LINCAN_CARD_pc_i03
61         {"pc-i03", pci03_register, 1},
62     #endif
63     #ifdef CONFIG_OC_LINCAN_CARD_pcm3680
64         {"pcm3680", pcm3680_register, 2},
65     #endif
66     #ifdef CONFIG_OC_LINCAN_CARD_pccan
67         {"pccan-f", pccanf_register, 1},
68         {"pccan-s", pccanf_register, 1},
69         {"pccan-d", pccand_register, 2},
70         {"pccan-q", pccanq_register, 4},
71     #endif
72     #if defined(CONFIG_OC_LINCAN_CARD_kv_pcican)&&defined(CAN_ENABLE_PCI_SUPPORT)
73         {"pcican-s", kv_pcican_register, 0},
74         {"pcican-d", kv_pcican_register, 0},
75         {"pcican-q", kv_pcican_register, 0},
76     #endif
77     #ifdef CONFIG_OC_LINCAN_CARD_m437
78         {"m437", m437_register, 1},
79     #endif
80     #ifdef CONFIG_OC_LINCAN_CARD_pcccan
81         {"pcccan", pcccan_register, 1},
82     #endif
83     #ifdef CONFIG_OC_LINCAN_CARD_ssv
84         {"ssv", ssv_register, 2},
85     #endif
86     #ifdef CONFIG_OC_LINCAN_CARD_bfadcan
87         {"bfadcan", bfadcan_register, 1},
88     #endif
89     #ifdef CONFIG_OC_LINCAN_CARD_pikronisa
90         {"pikronisa", pikronisa_register, 1},
91     #endif
92     #ifdef CONFIG_OC_LINCAN_CARD_msmcan
93         {"msmcan", msmcan_register, 1},
94     #endif
95     #ifdef CONFIG_OC_LINCAN_CARD_unican
96         {"unican", unican_register, 1},
97     #endif
98         {NULL}
99 };
100
101 const struct boardtype_t* boardtype_find(const char *str)
102 {
103         const struct boardtype_t *brp;
104
105         for(brp=can_boardtypes;brp->boardtype;brp++) {
106                 if(!strcmp(str,brp->boardtype))
107                         return brp;
108         }
109
110         return NULL;
111 }