Rev 538 | Rev 549 | 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 | #include <kernel/func.h> |
||
20 | |||
21 | /* System */ |
||
22 | extern int input_init(void); |
||
23 | extern int input_exit(void); |
||
24 | |||
25 | extern int serio_init(void); |
||
26 | extern int serio_exit(void); |
||
27 | |||
28 | /* Controllers */ |
||
29 | extern int i8042_init(void); |
||
30 | extern int i8042_exit(void); |
||
31 | |||
32 | /*extern int serport_init(void); |
||
33 | extern int serport_exit(void);*/ |
||
34 | |||
35 | /* Handlers */ |
||
36 | extern int evbug_init(void); |
||
37 | extern int evbug_exit(void); |
||
38 | |||
39 | int input_installed = FALSE; |
||
40 | |||
41 | /* Init the Linux Input Layer */ |
||
42 | int INPUT26_init() { |
||
43 | |||
44 | int ret; |
||
45 | |||
46 | if (input_installed == TRUE) return 0; |
||
47 | |||
48 | ret = input_init(); |
||
49 | if (ret) { |
||
50 | printk(KERN_ERR "Input_Init return: %d\n", ret); |
||
51 | return -1; |
||
52 | } |
||
53 | |||
54 | ret = serio_init(); |
||
55 | if (ret) { |
||
56 | printk(KERN_ERR "Serio_Init return: %d\n", ret); |
||
57 | return -1; |
||
58 | } |
||
59 | |||
60 | ret = i8042_init(); |
||
61 | if (ret) { |
||
62 | printk(KERN_ERR "i8042_Init return: %d\n", ret); |
||
63 | return -1; |
||
64 | } |
||
65 | |||
66 | /* TODO |
||
67 | ret = serport_init(); |
||
68 | if (ret) { |
||
69 | printk(KERN_ERR "SerPort_Init return: %d\n", ret); |
||
70 | return -1; |
||
71 | } */ |
||
72 | |||
73 | input_installed = TRUE; |
||
74 | |||
75 | return ret; |
||
76 | } |
||
77 | |||
78 | int INPUT26_close() { |
||
79 | |||
80 | if (input_installed == TRUE) { |
||
81 | i8042_exit(); |
||
82 | serio_exit(); |
||
83 | input_exit(); |
||
84 | |||
85 | return 0; |
||
86 | } else |
||
87 | return -1; |
||
88 | } |
||
89 | |||
538 | mauro | 90 | /* Init the Linux Event Debug Driver */ |
519 | mauro | 91 | int EVBUG26_init() { |
92 | evbug_init(); |
||
93 | |||
94 | return 0; |
||
95 | } |
||
96 | |||
97 | int EVBUG26_close() { |
||
98 | evbug_exit(); |
||
99 | |||
100 | return 0; |
||
101 | } |
||
102 |