Root/
1 | #ifndef __NWBUTTON_H |
2 | #define __NWBUTTON_H |
3 | |
4 | /* |
5 | * NetWinder Button Driver- |
6 | * Copyright (C) Alex Holden <alex@linuxhacker.org> 1998, 1999. |
7 | */ |
8 | |
9 | #ifdef __NWBUTTON_C /* Actually compiling the driver itself */ |
10 | |
11 | /* Various defines: */ |
12 | |
13 | #define NUM_PRESSES_REBOOT 2 /* How many presses to activate shutdown */ |
14 | #define BUTTON_DELAY 30 /* How many jiffies for sequence to end */ |
15 | #define VERSION "0.3" /* Driver version number */ |
16 | #define BUTTON_MINOR 158 /* Major 10, Minor 158, /dev/nwbutton */ |
17 | |
18 | /* Structure definitions: */ |
19 | |
20 | struct button_callback { |
21 | void (*callback) (void); |
22 | int count; |
23 | }; |
24 | |
25 | /* Function prototypes: */ |
26 | |
27 | static void button_sequence_finished (unsigned long parameters); |
28 | static irqreturn_t button_handler (int irq, void *dev_id); |
29 | int button_init (void); |
30 | int button_add_callback (void (*callback) (void), int count); |
31 | int button_del_callback (void (*callback) (void)); |
32 | static void button_consume_callbacks (int bpcount); |
33 | |
34 | #else /* Not compiling the driver itself */ |
35 | |
36 | extern int button_add_callback (void (*callback) (void), int count); |
37 | extern int button_del_callback (void (*callback) (void)); |
38 | |
39 | #endif /* __NWBUTTON_C */ |
40 | #endif /* __NWBUTTON_H */ |
41 |
Branches:
ben-wpan
ben-wpan-stefan
javiroman/ks7010
jz-2.6.34
jz-2.6.34-rc5
jz-2.6.34-rc6
jz-2.6.34-rc7
jz-2.6.35
jz-2.6.36
jz-2.6.37
jz-2.6.38
jz-2.6.39
jz-3.0
jz-3.1
jz-3.11
jz-3.12
jz-3.13
jz-3.15
jz-3.16
jz-3.18-dt
jz-3.2
jz-3.3
jz-3.4
jz-3.5
jz-3.6
jz-3.6-rc2-pwm
jz-3.9
jz-3.9-clk
jz-3.9-rc8
jz47xx
jz47xx-2.6.38
master
Tags:
od-2011-09-04
od-2011-09-18
v2.6.34-rc5
v2.6.34-rc6
v2.6.34-rc7
v3.9