Subversion Repositories shark

Rev

Rev 538 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
519 mauro 1
/*
2
 * Project: S.Ha.R.K.
3
 *
4
 * Coordinators:
5
 *   Giorgio Buttazzo    <giorgio@sssup.it>
6
 *   Paolo Gai           <pj@gandalf.sssup.it>
7
 *
8
 * Authors     :
9
 *   Mauro Marinoni      <mauro.marinoni@unipv.it>
10
 *
11
 *
12
 * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy)
13
 *
14
 * http://www.sssup.it
15
 * http://retis.sssup.it
16
 * http://shark.sssup.it
17
 */
18
 
19
/*
20
 * Copyright (C) 2000 Paolo Gai
21
 *
22
 * This program is free software; you can redistribute it and/or modify
23
 * it under the terms of the GNU General Public License as published by
24
 * the Free Software Foundation; either version 2 of the License, or
25
 * (at your option) any later version.
26
 *
27
 * This program is distributed in the hope that it will be useful,
28
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
29
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
30
 * GNU General Public License for more details.
31
 *
32
 * You should have received a copy of the GNU General Public License
33
 * along with this program; if not, write to the Free Software
34
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
35
 *
36
 */
37
 
38
#include <kernel/func.h>
39
 
40
/* System */
41
extern int input_init(void);
42
extern int input_exit(void);
43
 
44
extern int serio_init(void);
45
extern int serio_exit(void);
46
 
47
/* Controllers */
48
extern int i8042_init(void);
49
extern int i8042_exit(void);
50
 
51
/*extern int serport_init(void);
52
extern int serport_exit(void);*/
53
 
54
/* Devices */
55
/*extern int ns558_init(void);
56
extern int ns558_exit(void);
57
 
58
extern int analog_init(void);
59
extern int analog_exit(void);
60
 
61
extern int joydump_init(void);
62
extern int joydump_exit(void);*/
63
 
64
/* Handlers */
65
extern int evbug_init(void);
66
extern int evbug_exit(void);
67
 
68
int     input_installed = FALSE;
69
 
70
/* Init the Linux Input Layer */
71
int INPUT26_init() {
72
 
73
        int ret;
74
 
75
        if (input_installed == TRUE) return 0;
76
 
77
        ret = input_init();
78
        if (ret) {
79
                printk(KERN_ERR "Input_Init return: %d\n", ret);
80
                return -1;
81
        }
82
 
83
        ret = serio_init();
84
        if (ret) {
85
                printk(KERN_ERR "Serio_Init return: %d\n", ret);
86
                return -1;
87
        }
88
 
89
        ret = i8042_init();
90
        if (ret) {
91
                printk(KERN_ERR "i8042_Init return: %d\n", ret);
92
                return -1;
93
        }
94
 
95
        /* TODO
96
        ret = serport_init();
97
        if (ret) {
98
                printk(KERN_ERR "SerPort_Init return: %d\n", ret);
99
                return -1;
100
        } */
101
 
102
        input_installed = TRUE;
103
 
104
        return ret;
105
}
106
 
107
int INPUT26_close() {
108
 
109
        if (input_installed == TRUE) {
110
                i8042_exit();
111
                serio_exit();
112
                input_exit();
113
 
114
                return 0;
115
        } else
116
                return -1;
117
}
118
 
119
/* Init the Linux Joystick Driver */
120
/*int JOY26_init() {
121
 
122
        int ret;
123
 
124
        if (input_installed == FALSE)
125
                if (INPUT26_init()) {
126
                        printk(KERN_ERR "Unable to open Input SubSystem.\n");
127
                        return -1;
128
                }
129
 
130
        ret = ns558_init();
131
        if (ret) {
132
                printk(KERN_ERR "Gameport_Init return: %d\n", ret);
133
                return -1;
134
        }
135
 
136
        //ret = analog_init();
137
        ret = joydump_init();
138
        if (ret) {
139
                printk(KERN_ERR "Joystick_Init return: %d\n", ret);
140
                return -1;
141
        }
142
 
143
        return 0;
144
}
145
 
146
int JOY26_close() {
147
 
148
        //analog_exit();
149
        joydump_exit();
150
        ns558_exit();
151
        return 0;
152
}*/
153
 
154
int EVBUG26_init() {
155
        evbug_init();
156
 
157
        return 0;
158
}
159
 
160
int EVBUG26_close() {
161
        evbug_exit();
162
 
163
        return 0;
164
}
165