Rev 519 | Rev 547 | Go to most recent revision | Details | Compare with Previous | 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 | /* Handlers */ |
||
55 | extern int evbug_init(void); |
||
56 | extern int evbug_exit(void); |
||
57 | |||
58 | int input_installed = FALSE; |
||
59 | |||
60 | /* Init the Linux Input Layer */ |
||
61 | int INPUT26_init() { |
||
62 | |||
63 | int ret; |
||
64 | |||
65 | if (input_installed == TRUE) return 0; |
||
66 | |||
67 | ret = input_init(); |
||
68 | if (ret) { |
||
69 | printk(KERN_ERR "Input_Init return: %d\n", ret); |
||
70 | return -1; |
||
71 | } |
||
72 | |||
73 | ret = serio_init(); |
||
74 | if (ret) { |
||
75 | printk(KERN_ERR "Serio_Init return: %d\n", ret); |
||
76 | return -1; |
||
77 | } |
||
78 | |||
79 | ret = i8042_init(); |
||
80 | if (ret) { |
||
81 | printk(KERN_ERR "i8042_Init return: %d\n", ret); |
||
82 | return -1; |
||
83 | } |
||
84 | |||
85 | /* TODO |
||
86 | ret = serport_init(); |
||
87 | if (ret) { |
||
88 | printk(KERN_ERR "SerPort_Init return: %d\n", ret); |
||
89 | return -1; |
||
90 | } */ |
||
91 | |||
92 | input_installed = TRUE; |
||
93 | |||
94 | return ret; |
||
95 | } |
||
96 | |||
97 | int INPUT26_close() { |
||
98 | |||
99 | if (input_installed == TRUE) { |
||
100 | i8042_exit(); |
||
101 | serio_exit(); |
||
102 | input_exit(); |
||
103 | |||
104 | return 0; |
||
105 | } else |
||
106 | return -1; |
||
107 | } |
||
108 | |||
538 | mauro | 109 | /* Init the Linux Event Debug Driver */ |
519 | mauro | 110 | int EVBUG26_init() { |
111 | evbug_init(); |
||
112 | |||
113 | return 0; |
||
114 | } |
||
115 | |||
116 | int EVBUG26_close() { |
||
117 | evbug_exit(); |
||
118 | |||
119 | return 0; |
||
120 | } |
||
121 |