diff options
author | Tony Lindgren <tony@atomide.com> | 2011-03-02 20:07:14 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2011-03-02 20:07:14 -0500 |
commit | 12d7d4e0ed8fecf7f74c89483b55b300be6e5901 (patch) | |
tree | f573761ac752ff04ec445e23aef50adadda49790 /drivers/input | |
parent | aca6ad073ea820776bf5bdb87cf82eace35042c8 (diff) | |
parent | 790ab7e92bec24aee3939b300d36b99ab2e3f3ca (diff) |
Merge branch 'devel-cleanup' into omap-for-linus
Conflicts:
arch/arm/mach-omap2/timer-gp.c
Diffstat (limited to 'drivers/input')
-rw-r--r-- | drivers/input/gameport/gameport.c | 2 | ||||
-rw-r--r-- | drivers/input/keyboard/tegra-kbc.c | 62 | ||||
-rw-r--r-- | drivers/input/mouse/synaptics.h | 23 | ||||
-rw-r--r-- | drivers/input/serio/serio.c | 2 |
4 files changed, 84 insertions, 5 deletions
diff --git a/drivers/input/gameport/gameport.c b/drivers/input/gameport/gameport.c index 23cf8fc933ec..5b8f59d6c3e8 100644 --- a/drivers/input/gameport/gameport.c +++ b/drivers/input/gameport/gameport.c | |||
@@ -360,7 +360,7 @@ static int gameport_queue_event(void *object, struct module *owner, | |||
360 | event->owner = owner; | 360 | event->owner = owner; |
361 | 361 | ||
362 | list_add_tail(&event->node, &gameport_event_list); | 362 | list_add_tail(&event->node, &gameport_event_list); |
363 | schedule_work(&gameport_event_work); | 363 | queue_work(system_long_wq, &gameport_event_work); |
364 | 364 | ||
365 | out: | 365 | out: |
366 | spin_unlock_irqrestore(&gameport_event_lock, flags); | 366 | spin_unlock_irqrestore(&gameport_event_lock, flags); |
diff --git a/drivers/input/keyboard/tegra-kbc.c b/drivers/input/keyboard/tegra-kbc.c index ac471b77c18e..99ce9032d08c 100644 --- a/drivers/input/keyboard/tegra-kbc.c +++ b/drivers/input/keyboard/tegra-kbc.c | |||
@@ -71,8 +71,9 @@ struct tegra_kbc { | |||
71 | spinlock_t lock; | 71 | spinlock_t lock; |
72 | unsigned int repoll_dly; | 72 | unsigned int repoll_dly; |
73 | unsigned long cp_dly_jiffies; | 73 | unsigned long cp_dly_jiffies; |
74 | bool use_fn_map; | ||
74 | const struct tegra_kbc_platform_data *pdata; | 75 | const struct tegra_kbc_platform_data *pdata; |
75 | unsigned short keycode[KBC_MAX_KEY]; | 76 | unsigned short keycode[KBC_MAX_KEY * 2]; |
76 | unsigned short current_keys[KBC_MAX_KPENT]; | 77 | unsigned short current_keys[KBC_MAX_KPENT]; |
77 | unsigned int num_pressed_keys; | 78 | unsigned int num_pressed_keys; |
78 | struct timer_list timer; | 79 | struct timer_list timer; |
@@ -178,6 +179,40 @@ static const u32 tegra_kbc_default_keymap[] = { | |||
178 | KEY(15, 5, KEY_F2), | 179 | KEY(15, 5, KEY_F2), |
179 | KEY(15, 6, KEY_CAPSLOCK), | 180 | KEY(15, 6, KEY_CAPSLOCK), |
180 | KEY(15, 7, KEY_F6), | 181 | KEY(15, 7, KEY_F6), |
182 | |||
183 | /* Software Handled Function Keys */ | ||
184 | KEY(20, 0, KEY_KP7), | ||
185 | |||
186 | KEY(21, 0, KEY_KP9), | ||
187 | KEY(21, 1, KEY_KP8), | ||
188 | KEY(21, 2, KEY_KP4), | ||
189 | KEY(21, 4, KEY_KP1), | ||
190 | |||
191 | KEY(22, 1, KEY_KPSLASH), | ||
192 | KEY(22, 2, KEY_KP6), | ||
193 | KEY(22, 3, KEY_KP5), | ||
194 | KEY(22, 4, KEY_KP3), | ||
195 | KEY(22, 5, KEY_KP2), | ||
196 | KEY(22, 7, KEY_KP0), | ||
197 | |||
198 | KEY(27, 1, KEY_KPASTERISK), | ||
199 | KEY(27, 3, KEY_KPMINUS), | ||
200 | KEY(27, 4, KEY_KPPLUS), | ||
201 | KEY(27, 5, KEY_KPDOT), | ||
202 | |||
203 | KEY(28, 5, KEY_VOLUMEUP), | ||
204 | |||
205 | KEY(29, 3, KEY_HOME), | ||
206 | KEY(29, 4, KEY_END), | ||
207 | KEY(29, 5, KEY_BRIGHTNESSDOWN), | ||
208 | KEY(29, 6, KEY_VOLUMEDOWN), | ||
209 | KEY(29, 7, KEY_BRIGHTNESSUP), | ||
210 | |||
211 | KEY(30, 0, KEY_NUMLOCK), | ||
212 | KEY(30, 1, KEY_SCROLLLOCK), | ||
213 | KEY(30, 2, KEY_MUTE), | ||
214 | |||
215 | KEY(31, 4, KEY_HELP), | ||
181 | }; | 216 | }; |
182 | 217 | ||
183 | static const struct matrix_keymap_data tegra_kbc_default_keymap_data = { | 218 | static const struct matrix_keymap_data tegra_kbc_default_keymap_data = { |
@@ -224,6 +259,7 @@ static void tegra_kbc_report_keys(struct tegra_kbc *kbc) | |||
224 | unsigned int i; | 259 | unsigned int i; |
225 | unsigned int num_down = 0; | 260 | unsigned int num_down = 0; |
226 | unsigned long flags; | 261 | unsigned long flags; |
262 | bool fn_keypress = false; | ||
227 | 263 | ||
228 | spin_lock_irqsave(&kbc->lock, flags); | 264 | spin_lock_irqsave(&kbc->lock, flags); |
229 | for (i = 0; i < KBC_MAX_KPENT; i++) { | 265 | for (i = 0; i < KBC_MAX_KPENT; i++) { |
@@ -237,11 +273,28 @@ static void tegra_kbc_report_keys(struct tegra_kbc *kbc) | |||
237 | MATRIX_SCAN_CODE(row, col, KBC_ROW_SHIFT); | 273 | MATRIX_SCAN_CODE(row, col, KBC_ROW_SHIFT); |
238 | 274 | ||
239 | scancodes[num_down] = scancode; | 275 | scancodes[num_down] = scancode; |
240 | keycodes[num_down++] = kbc->keycode[scancode]; | 276 | keycodes[num_down] = kbc->keycode[scancode]; |
277 | /* If driver uses Fn map, do not report the Fn key. */ | ||
278 | if ((keycodes[num_down] == KEY_FN) && kbc->use_fn_map) | ||
279 | fn_keypress = true; | ||
280 | else | ||
281 | num_down++; | ||
241 | } | 282 | } |
242 | 283 | ||
243 | val >>= 8; | 284 | val >>= 8; |
244 | } | 285 | } |
286 | |||
287 | /* | ||
288 | * If the platform uses Fn keymaps, translate keys on a Fn keypress. | ||
289 | * Function keycodes are KBC_MAX_KEY apart from the plain keycodes. | ||
290 | */ | ||
291 | if (fn_keypress) { | ||
292 | for (i = 0; i < num_down; i++) { | ||
293 | scancodes[i] += KBC_MAX_KEY; | ||
294 | keycodes[i] = kbc->keycode[scancodes[i]]; | ||
295 | } | ||
296 | } | ||
297 | |||
245 | spin_unlock_irqrestore(&kbc->lock, flags); | 298 | spin_unlock_irqrestore(&kbc->lock, flags); |
246 | 299 | ||
247 | tegra_kbc_report_released_keys(kbc->idev, | 300 | tegra_kbc_report_released_keys(kbc->idev, |
@@ -594,8 +647,11 @@ static int __devinit tegra_kbc_probe(struct platform_device *pdev) | |||
594 | 647 | ||
595 | input_dev->keycode = kbc->keycode; | 648 | input_dev->keycode = kbc->keycode; |
596 | input_dev->keycodesize = sizeof(kbc->keycode[0]); | 649 | input_dev->keycodesize = sizeof(kbc->keycode[0]); |
597 | input_dev->keycodemax = ARRAY_SIZE(kbc->keycode); | 650 | input_dev->keycodemax = KBC_MAX_KEY; |
651 | if (pdata->use_fn_map) | ||
652 | input_dev->keycodemax *= 2; | ||
598 | 653 | ||
654 | kbc->use_fn_map = pdata->use_fn_map; | ||
599 | keymap_data = pdata->keymap_data ?: &tegra_kbc_default_keymap_data; | 655 | keymap_data = pdata->keymap_data ?: &tegra_kbc_default_keymap_data; |
600 | matrix_keypad_build_keymap(keymap_data, KBC_ROW_SHIFT, | 656 | matrix_keypad_build_keymap(keymap_data, KBC_ROW_SHIFT, |
601 | input_dev->keycode, input_dev->keybit); | 657 | input_dev->keycode, input_dev->keybit); |
diff --git a/drivers/input/mouse/synaptics.h b/drivers/input/mouse/synaptics.h index 25e5d042a72c..7453938bf5ef 100644 --- a/drivers/input/mouse/synaptics.h +++ b/drivers/input/mouse/synaptics.h | |||
@@ -51,6 +51,29 @@ | |||
51 | #define SYN_EXT_CAP_REQUESTS(c) (((c) & 0x700000) >> 20) | 51 | #define SYN_EXT_CAP_REQUESTS(c) (((c) & 0x700000) >> 20) |
52 | #define SYN_CAP_MULTI_BUTTON_NO(ec) (((ec) & 0x00f000) >> 12) | 52 | #define SYN_CAP_MULTI_BUTTON_NO(ec) (((ec) & 0x00f000) >> 12) |
53 | #define SYN_CAP_PRODUCT_ID(ec) (((ec) & 0xff0000) >> 16) | 53 | #define SYN_CAP_PRODUCT_ID(ec) (((ec) & 0xff0000) >> 16) |
54 | |||
55 | /* | ||
56 | * The following describes response for the 0x0c query. | ||
57 | * | ||
58 | * byte mask name meaning | ||
59 | * ---- ---- ------- ------------ | ||
60 | * 1 0x01 adjustable threshold capacitive button sensitivity | ||
61 | * can be adjusted | ||
62 | * 1 0x02 report max query 0x0d gives max coord reported | ||
63 | * 1 0x04 clearpad sensor is ClearPad product | ||
64 | * 1 0x08 advanced gesture not particularly meaningful | ||
65 | * 1 0x10 clickpad bit 0 1-button ClickPad | ||
66 | * 1 0x60 multifinger mode identifies firmware finger counting | ||
67 | * (not reporting!) algorithm. | ||
68 | * Not particularly meaningful | ||
69 | * 1 0x80 covered pad W clipped to 14, 15 == pad mostly covered | ||
70 | * 2 0x01 clickpad bit 1 2-button ClickPad | ||
71 | * 2 0x02 deluxe LED controls touchpad support LED commands | ||
72 | * ala multimedia control bar | ||
73 | * 2 0x04 reduced filtering firmware does less filtering on | ||
74 | * position data, driver should watch | ||
75 | * for noise. | ||
76 | */ | ||
54 | #define SYN_CAP_CLICKPAD(ex0c) ((ex0c) & 0x100000) /* 1-button ClickPad */ | 77 | #define SYN_CAP_CLICKPAD(ex0c) ((ex0c) & 0x100000) /* 1-button ClickPad */ |
55 | #define SYN_CAP_CLICKPAD2BTN(ex0c) ((ex0c) & 0x000100) /* 2-button ClickPad */ | 78 | #define SYN_CAP_CLICKPAD2BTN(ex0c) ((ex0c) & 0x000100) /* 2-button ClickPad */ |
56 | #define SYN_CAP_MAX_DIMENSIONS(ex0c) ((ex0c) & 0x020000) | 79 | #define SYN_CAP_MAX_DIMENSIONS(ex0c) ((ex0c) & 0x020000) |
diff --git a/drivers/input/serio/serio.c b/drivers/input/serio/serio.c index 7c38d1fbabf2..ba70058e2be3 100644 --- a/drivers/input/serio/serio.c +++ b/drivers/input/serio/serio.c | |||
@@ -299,7 +299,7 @@ static int serio_queue_event(void *object, struct module *owner, | |||
299 | event->owner = owner; | 299 | event->owner = owner; |
300 | 300 | ||
301 | list_add_tail(&event->node, &serio_event_list); | 301 | list_add_tail(&event->node, &serio_event_list); |
302 | schedule_work(&serio_event_work); | 302 | queue_work(system_long_wq, &serio_event_work); |
303 | 303 | ||
304 | out: | 304 | out: |
305 | spin_unlock_irqrestore(&serio_event_lock, flags); | 305 | spin_unlock_irqrestore(&serio_event_lock, flags); |