diff options
Diffstat (limited to 'drivers/hid/hid-input.c')
-rw-r--r-- | drivers/hid/hid-input.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c index 5862b0f3b55..79d9edd0bdf 100644 --- a/drivers/hid/hid-input.c +++ b/drivers/hid/hid-input.c | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | * Copyright (c) 2000-2001 Vojtech Pavlik | 2 | * Copyright (c) 2000-2001 Vojtech Pavlik |
3 | * Copyright (c) 2006-2007 Jiri Kosina | 3 | * Copyright (c) 2006-2010 Jiri Kosina |
4 | * | 4 | * |
5 | * HID to Linux Input mapping | 5 | * HID to Linux Input mapping |
6 | */ | 6 | */ |
@@ -193,12 +193,17 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
193 | break; | 193 | break; |
194 | 194 | ||
195 | case HID_UP_BUTTON: | 195 | case HID_UP_BUTTON: |
196 | code = ((usage->hid - 1) & 0xf); | 196 | code = ((usage->hid - 1) & HID_USAGE); |
197 | 197 | ||
198 | switch (field->application) { | 198 | switch (field->application) { |
199 | case HID_GD_MOUSE: | 199 | case HID_GD_MOUSE: |
200 | case HID_GD_POINTER: code += 0x110; break; | 200 | case HID_GD_POINTER: code += 0x110; break; |
201 | case HID_GD_JOYSTICK: code += 0x120; break; | 201 | case HID_GD_JOYSTICK: |
202 | if (code <= 0xf) | ||
203 | code += BTN_JOYSTICK; | ||
204 | else | ||
205 | code += BTN_TRIGGER_HAPPY; | ||
206 | break; | ||
202 | case HID_GD_GAMEPAD: code += 0x130; break; | 207 | case HID_GD_GAMEPAD: code += 0x130; break; |
203 | default: | 208 | default: |
204 | switch (field->physical) { | 209 | switch (field->physical) { |
@@ -400,6 +405,7 @@ static void hidinput_configure_usage(struct hid_input *hidinput, struct hid_fiel | |||
400 | case 0x192: map_key_clear(KEY_CALC); break; | 405 | case 0x192: map_key_clear(KEY_CALC); break; |
401 | case 0x194: map_key_clear(KEY_FILE); break; | 406 | case 0x194: map_key_clear(KEY_FILE); break; |
402 | case 0x196: map_key_clear(KEY_WWW); break; | 407 | case 0x196: map_key_clear(KEY_WWW); break; |
408 | case 0x199: map_key_clear(KEY_CHAT); break; | ||
403 | case 0x19c: map_key_clear(KEY_LOGOFF); break; | 409 | case 0x19c: map_key_clear(KEY_LOGOFF); break; |
404 | case 0x19e: map_key_clear(KEY_COFFEE); break; | 410 | case 0x19e: map_key_clear(KEY_COFFEE); break; |
405 | case 0x1a6: map_key_clear(KEY_HELP); break; | 411 | case 0x1a6: map_key_clear(KEY_HELP); break; |