Root/
1 | /* |
2 | * Driver for simulating a mouse on GPIO lines. |
3 | * |
4 | * Copyright (C) 2007 Atmel Corporation |
5 | * |
6 | * This program is free software; you can redistribute it and/or modify |
7 | * it under the terms of the GNU General Public License version 2 as |
8 | * published by the Free Software Foundation. |
9 | */ |
10 | |
11 | #ifndef _GPIO_MOUSE_H |
12 | #define _GPIO_MOUSE_H |
13 | |
14 | #define GPIO_MOUSE_POLARITY_ACT_HIGH 0x00 |
15 | #define GPIO_MOUSE_POLARITY_ACT_LOW 0x01 |
16 | |
17 | #define GPIO_MOUSE_PIN_UP 0 |
18 | #define GPIO_MOUSE_PIN_DOWN 1 |
19 | #define GPIO_MOUSE_PIN_LEFT 2 |
20 | #define GPIO_MOUSE_PIN_RIGHT 3 |
21 | #define GPIO_MOUSE_PIN_BLEFT 4 |
22 | #define GPIO_MOUSE_PIN_BMIDDLE 5 |
23 | #define GPIO_MOUSE_PIN_BRIGHT 6 |
24 | #define GPIO_MOUSE_PIN_MAX 7 |
25 | |
26 | /** |
27 | * struct gpio_mouse_platform_data |
28 | * @scan_ms: integer in ms specifying the scan periode. |
29 | * @polarity: Pin polarity, active high or low. |
30 | * @up: GPIO line for up value. |
31 | * @down: GPIO line for down value. |
32 | * @left: GPIO line for left value. |
33 | * @right: GPIO line for right value. |
34 | * @bleft: GPIO line for left button. |
35 | * @bmiddle: GPIO line for middle button. |
36 | * @bright: GPIO line for right button. |
37 | * |
38 | * This struct must be added to the platform_device in the board code. |
39 | * It is used by the gpio_mouse driver to setup GPIO lines and to |
40 | * calculate mouse movement. |
41 | */ |
42 | struct gpio_mouse_platform_data { |
43 | int scan_ms; |
44 | int polarity; |
45 | |
46 | union { |
47 | struct { |
48 | int up; |
49 | int down; |
50 | int left; |
51 | int right; |
52 | |
53 | int bleft; |
54 | int bmiddle; |
55 | int bright; |
56 | }; |
57 | int pins[GPIO_MOUSE_PIN_MAX]; |
58 | }; |
59 | }; |
60 | |
61 | #endif /* _GPIO_MOUSE_H */ |
62 |
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