diff options
author | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-07 15:57:44 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-02-07 15:57:44 -0500 |
commit | 6e5565f949af1322f8f3d3f43d044645ae448499 (patch) | |
tree | 92868f6d3dcc6c105a0d35f9412f75c07139402e /include | |
parent | e5a9e8e6890d9b9c7a0f25b03ffdaf28614a9a4c (diff) | |
parent | 03366e7b9bf1544cb0b98f1a5cd6d340654f486a (diff) |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (34 commits)
Input: i8042 - non-x86 build fix
Input: pxa27x_keypad - also enable on PXA3xx
Input: pxa27x_keypad - add debounce_interval to the keypad platform data
Input: pxa27x_keypad - use device resources for I/O memory mapping and IRQ
Input: pxa27x_keypad - enable rotary encoders and direct keys
Input: pxa27x_keypad - introduce pxa27x_keypad_config()
Input: pxa27x_keypad - introduce driver structure and use KEY() to define matrix keys
Input: pxa27x_keypad - remove pin configuration from the driver
Input: pxa27x_keypad - rename the driver (was pxa27x_keyboard)
Input: constify function pointer tables (seq_operations)
Input: i8042 - add Fujitsu-Siemens Amilo Pro 2010 to nomux list
Input: i8042 - enable DMI quirks on x86-64
Input: i8042 - add Dritek quirk for Acer Aspire 9110
Input: add input event to APM event bridge
Input: mousedev - use BIT_MASK instead of BIT
Input: remove duplicate includes
Input: remove cdev from input_dev structure
Input: remove duplicated headers in drivers/char/keyboard.c
Input: i8042 - add Dritek keyboard extension quirk
Input: add Tosa keyboard driver
...
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-arm/arch-pxa/pxa27x_keyboard.h | 13 | ||||
-rw-r--r-- | include/asm-arm/arch-pxa/pxa27x_keypad.h | 56 | ||||
-rw-r--r-- | include/asm-arm/arch-pxa/tosa.h | 30 | ||||
-rw-r--r-- | include/linux/input.h | 7 |
4 files changed, 89 insertions, 17 deletions
diff --git a/include/asm-arm/arch-pxa/pxa27x_keyboard.h b/include/asm-arm/arch-pxa/pxa27x_keyboard.h deleted file mode 100644 index 3aaff923b2ca..000000000000 --- a/include/asm-arm/arch-pxa/pxa27x_keyboard.h +++ /dev/null | |||
@@ -1,13 +0,0 @@ | |||
1 | #define PXAKBD_MAXROW 8 | ||
2 | #define PXAKBD_MAXCOL 8 | ||
3 | |||
4 | struct pxa27x_keyboard_platform_data { | ||
5 | int nr_rows, nr_cols; | ||
6 | int keycodes[PXAKBD_MAXROW][PXAKBD_MAXCOL]; | ||
7 | int gpio_modes[PXAKBD_MAXROW + PXAKBD_MAXCOL]; | ||
8 | |||
9 | #ifdef CONFIG_PM | ||
10 | u32 reg_kpc; | ||
11 | u32 reg_kprec; | ||
12 | #endif | ||
13 | }; | ||
diff --git a/include/asm-arm/arch-pxa/pxa27x_keypad.h b/include/asm-arm/arch-pxa/pxa27x_keypad.h new file mode 100644 index 000000000000..644f7609b523 --- /dev/null +++ b/include/asm-arm/arch-pxa/pxa27x_keypad.h | |||
@@ -0,0 +1,56 @@ | |||
1 | #ifndef __ASM_ARCH_PXA27x_KEYPAD_H | ||
2 | #define __ASM_ARCH_PXA27x_KEYPAD_H | ||
3 | |||
4 | #include <linux/input.h> | ||
5 | |||
6 | #define MAX_MATRIX_KEY_ROWS (8) | ||
7 | #define MAX_MATRIX_KEY_COLS (8) | ||
8 | |||
9 | /* pxa3xx keypad platform specific parameters | ||
10 | * | ||
11 | * NOTE: | ||
12 | * 1. direct_key_num indicates the number of keys in the direct keypad | ||
13 | * _plus_ the number of rotary-encoder sensor inputs, this can be | ||
14 | * left as 0 if only rotary encoders are enabled, the driver will | ||
15 | * automatically calculate this | ||
16 | * | ||
17 | * 2. direct_key_map is the key code map for the direct keys, if rotary | ||
18 | * encoder(s) are enabled, direct key 0/1(2/3) will be ignored | ||
19 | * | ||
20 | * 3. rotary can be either interpreted as a relative input event (e.g. | ||
21 | * REL_WHEEL/REL_HWHEEL) or specific keys (e.g. UP/DOWN/LEFT/RIGHT) | ||
22 | * | ||
23 | * 4. matrix key and direct key will use the same debounce_interval by | ||
24 | * default, which should be sufficient in most cases | ||
25 | */ | ||
26 | struct pxa27x_keypad_platform_data { | ||
27 | |||
28 | /* code map for the matrix keys */ | ||
29 | unsigned int matrix_key_rows; | ||
30 | unsigned int matrix_key_cols; | ||
31 | unsigned int *matrix_key_map; | ||
32 | int matrix_key_map_size; | ||
33 | |||
34 | /* direct keys */ | ||
35 | int direct_key_num; | ||
36 | unsigned int direct_key_map[8]; | ||
37 | |||
38 | /* rotary encoders 0 */ | ||
39 | int enable_rotary0; | ||
40 | int rotary0_rel_code; | ||
41 | int rotary0_up_key; | ||
42 | int rotary0_down_key; | ||
43 | |||
44 | /* rotary encoders 1 */ | ||
45 | int enable_rotary1; | ||
46 | int rotary1_rel_code; | ||
47 | int rotary1_up_key; | ||
48 | int rotary1_down_key; | ||
49 | |||
50 | /* key debounce interval */ | ||
51 | unsigned int debounce_interval; | ||
52 | }; | ||
53 | |||
54 | #define KEY(row, col, val) (((row) << 28) | ((col) << 24) | (val)) | ||
55 | |||
56 | #endif /* __ASM_ARCH_PXA27x_KEYPAD_H */ | ||
diff --git a/include/asm-arm/arch-pxa/tosa.h b/include/asm-arm/arch-pxa/tosa.h index c3364a2c4758..c05e4faf85a6 100644 --- a/include/asm-arm/arch-pxa/tosa.h +++ b/include/asm-arm/arch-pxa/tosa.h | |||
@@ -163,4 +163,34 @@ | |||
163 | 163 | ||
164 | extern struct platform_device tosascoop_jc_device; | 164 | extern struct platform_device tosascoop_jc_device; |
165 | extern struct platform_device tosascoop_device; | 165 | extern struct platform_device tosascoop_device; |
166 | |||
167 | #define TOSA_KEY_SYNC KEY_102ND /* ??? */ | ||
168 | |||
169 | |||
170 | #ifndef CONFIG_KEYBOARD_TOSA_USE_EXT_KEYCODES | ||
171 | #define TOSA_KEY_RECORD KEY_YEN | ||
172 | #define TOSA_KEY_ADDRESSBOOK KEY_KATAKANA | ||
173 | #define TOSA_KEY_CANCEL KEY_ESC | ||
174 | #define TOSA_KEY_CENTER KEY_HIRAGANA | ||
175 | #define TOSA_KEY_OK KEY_HENKAN | ||
176 | #define TOSA_KEY_CALENDAR KEY_KATAKANAHIRAGANA | ||
177 | #define TOSA_KEY_HOMEPAGE KEY_HANGEUL | ||
178 | #define TOSA_KEY_LIGHT KEY_MUHENKAN | ||
179 | #define TOSA_KEY_MENU KEY_HANJA | ||
180 | #define TOSA_KEY_FN KEY_RIGHTALT | ||
181 | #define TOSA_KEY_MAIL KEY_ZENKAKUHANKAKU | ||
182 | #else | ||
183 | #define TOSA_KEY_RECORD KEY_RECORD | ||
184 | #define TOSA_KEY_ADDRESSBOOK KEY_ADDRESSBOOK | ||
185 | #define TOSA_KEY_CANCEL KEY_CANCEL | ||
186 | #define TOSA_KEY_CENTER KEY_SELECT /* ??? */ | ||
187 | #define TOSA_KEY_OK KEY_OK | ||
188 | #define TOSA_KEY_CALENDAR KEY_CALENDAR | ||
189 | #define TOSA_KEY_HOMEPAGE KEY_HOMEPAGE | ||
190 | #define TOSA_KEY_LIGHT KEY_KBDILLUMTOGGLE | ||
191 | #define TOSA_KEY_MENU KEY_MENU | ||
192 | #define TOSA_KEY_FN KEY_FN | ||
193 | #define TOSA_KEY_MAIL KEY_MAIL | ||
194 | #endif | ||
195 | |||
166 | #endif /* _ASM_ARCH_TOSA_H_ */ | 196 | #endif /* _ASM_ARCH_TOSA_H_ */ |
diff --git a/include/linux/input.h b/include/linux/input.h index 056a17a4f34f..1bdc39a8c76c 100644 --- a/include/linux/input.h +++ b/include/linux/input.h | |||
@@ -1020,7 +1020,6 @@ struct ff_effect { | |||
1020 | * @going_away: marks devices that are in a middle of unregistering and | 1020 | * @going_away: marks devices that are in a middle of unregistering and |
1021 | * causes input_open_device*() fail with -ENODEV. | 1021 | * causes input_open_device*() fail with -ENODEV. |
1022 | * @dev: driver model's view of this device | 1022 | * @dev: driver model's view of this device |
1023 | * @cdev: union for struct device pointer | ||
1024 | * @h_list: list of input handles associated with the device. When | 1023 | * @h_list: list of input handles associated with the device. When |
1025 | * accessing the list dev->mutex must be held | 1024 | * accessing the list dev->mutex must be held |
1026 | * @node: used to place the device onto input_dev_list | 1025 | * @node: used to place the device onto input_dev_list |
@@ -1085,9 +1084,6 @@ struct input_dev { | |||
1085 | int going_away; | 1084 | int going_away; |
1086 | 1085 | ||
1087 | struct device dev; | 1086 | struct device dev; |
1088 | union { /* temporarily so while we switching to struct device */ | ||
1089 | struct device *dev; | ||
1090 | } cdev; | ||
1091 | 1087 | ||
1092 | struct list_head h_list; | 1088 | struct list_head h_list; |
1093 | struct list_head node; | 1089 | struct list_head node; |
@@ -1311,6 +1307,9 @@ static inline void input_set_abs_params(struct input_dev *dev, int axis, int min | |||
1311 | dev->absbit[BIT_WORD(axis)] |= BIT_MASK(axis); | 1307 | dev->absbit[BIT_WORD(axis)] |= BIT_MASK(axis); |
1312 | } | 1308 | } |
1313 | 1309 | ||
1310 | int input_get_keycode(struct input_dev *dev, int scancode, int *keycode); | ||
1311 | int input_set_keycode(struct input_dev *dev, int scancode, int keycode); | ||
1312 | |||
1314 | extern struct class input_class; | 1313 | extern struct class input_class; |
1315 | 1314 | ||
1316 | /** | 1315 | /** |