diff options
| author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-23 12:44:31 -0400 |
|---|---|---|
| committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-23 12:44:31 -0400 |
| commit | 876a4256d25b7fd7917f53e767da1ebdf3168457 (patch) | |
| tree | 7dc10fad31d1048b8337d049a3572fa35e79e3fb /drivers/hid/hid-input-quirks.c | |
| parent | 7c1fed03b9fa32d4323d5caa6a9c7dcdd7eba767 (diff) | |
| parent | b22d8370061898f3029cdc2601fbdec493443f03 (diff) | |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
HID: apple_fn_keys F5 and F6
HID: remove quirk lookup from usbkbd/usbmouse
HID: Add mapping of new KEY_MEDIA_REPEAT keycode
HID: gyration remote support
HID: gyration sleep button quirk
HID: add quirk for Logitech DiNovo desktop
HID: fix quirk handling in usbmouse/kbd
HID: fix memory leak in hidraw_release
HID: add n-trig digitizer usage
HID: Invert HWHEEL mappings for some Logitech mice
HID:usbkbd:mark usb_kbd_keycode array as const
HID: add fn key support on Macbook Pro 4,1 and Macbook Air
HID: remove unused variable from hiddev compat ioctl
HID: fix compile issue in hiddev ioctl
HID: Push down BKL into ioctl handler in hidraw
HID: Switch hiddev to unlocked_ioctl
HID: use get/put_unaligned_* helpers
HID: fix report descriptor handling for MS Wireless model 1028
Diffstat (limited to 'drivers/hid/hid-input-quirks.c')
| -rw-r--r-- | drivers/hid/hid-input-quirks.c | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/drivers/hid/hid-input-quirks.c b/drivers/hid/hid-input-quirks.c index 4c2052c658f1..16feea014494 100644 --- a/drivers/hid/hid-input-quirks.c +++ b/drivers/hid/hid-input-quirks.c | |||
| @@ -89,6 +89,29 @@ static int quirk_logitech_ultrax_remote(struct hid_usage *usage, struct input_de | |||
| 89 | return 1; | 89 | return 1; |
| 90 | } | 90 | } |
| 91 | 91 | ||
| 92 | static int quirk_gyration_remote(struct hid_usage *usage, struct input_dev *input, | ||
| 93 | unsigned long **bit, int *max) | ||
| 94 | { | ||
| 95 | if ((usage->hid & HID_USAGE_PAGE) != HID_UP_LOGIVENDOR) | ||
| 96 | return 0; | ||
| 97 | |||
| 98 | set_bit(EV_REP, input->evbit); | ||
| 99 | switch(usage->hid & HID_USAGE) { | ||
| 100 | /* Reported on Gyration MCE Remote */ | ||
| 101 | case 0x00d: map_key_clear(KEY_HOME); break; | ||
| 102 | case 0x024: map_key_clear(KEY_DVD); break; | ||
| 103 | case 0x025: map_key_clear(KEY_PVR); break; | ||
| 104 | case 0x046: map_key_clear(KEY_MEDIA); break; | ||
| 105 | case 0x047: map_key_clear(KEY_MP3); break; | ||
| 106 | case 0x049: map_key_clear(KEY_CAMERA); break; | ||
| 107 | case 0x04a: map_key_clear(KEY_VIDEO); break; | ||
| 108 | |||
| 109 | default: | ||
| 110 | return 0; | ||
| 111 | } | ||
| 112 | return 1; | ||
| 113 | } | ||
| 114 | |||
| 92 | static int quirk_chicony_tactical_pad(struct hid_usage *usage, struct input_dev *input, | 115 | static int quirk_chicony_tactical_pad(struct hid_usage *usage, struct input_dev *input, |
| 93 | unsigned long **bit, int *max) | 116 | unsigned long **bit, int *max) |
| 94 | { | 117 | { |
| @@ -303,6 +326,9 @@ static int quirk_sunplus_wdesktop(struct hid_usage *usage, struct input_dev *inp | |||
| 303 | #define VENDOR_ID_EZKEY 0x0518 | 326 | #define VENDOR_ID_EZKEY 0x0518 |
| 304 | #define DEVICE_ID_BTC_8193 0x0002 | 327 | #define DEVICE_ID_BTC_8193 0x0002 |
| 305 | 328 | ||
| 329 | #define VENDOR_ID_GYRATION 0x0c16 | ||
| 330 | #define DEVICE_ID_GYRATION_REMOTE 0x0002 | ||
| 331 | |||
| 306 | #define VENDOR_ID_LOGITECH 0x046d | 332 | #define VENDOR_ID_LOGITECH 0x046d |
| 307 | #define DEVICE_ID_LOGITECH_RECEIVER 0xc101 | 333 | #define DEVICE_ID_LOGITECH_RECEIVER 0xc101 |
| 308 | #define DEVICE_ID_S510_RECEIVER 0xc50c | 334 | #define DEVICE_ID_S510_RECEIVER 0xc50c |
| @@ -337,6 +363,8 @@ static const struct hid_input_blacklist { | |||
| 337 | 363 | ||
| 338 | { VENDOR_ID_EZKEY, DEVICE_ID_BTC_8193, quirk_btc_8193 }, | 364 | { VENDOR_ID_EZKEY, DEVICE_ID_BTC_8193, quirk_btc_8193 }, |
| 339 | 365 | ||
| 366 | { VENDOR_ID_GYRATION, DEVICE_ID_GYRATION_REMOTE, quirk_gyration_remote }, | ||
| 367 | |||
| 340 | { VENDOR_ID_LOGITECH, DEVICE_ID_LOGITECH_RECEIVER, quirk_logitech_ultrax_remote }, | 368 | { VENDOR_ID_LOGITECH, DEVICE_ID_LOGITECH_RECEIVER, quirk_logitech_ultrax_remote }, |
| 341 | { VENDOR_ID_LOGITECH, DEVICE_ID_S510_RECEIVER, quirk_logitech_wireless }, | 369 | { VENDOR_ID_LOGITECH, DEVICE_ID_S510_RECEIVER, quirk_logitech_wireless }, |
| 342 | { VENDOR_ID_LOGITECH, DEVICE_ID_S510_RECEIVER_2, quirk_logitech_wireless }, | 370 | { VENDOR_ID_LOGITECH, DEVICE_ID_S510_RECEIVER_2, quirk_logitech_wireless }, |
| @@ -438,6 +466,18 @@ int hidinput_event_quirks(struct hid_device *hid, struct hid_field *field, struc | |||
| 438 | input_event(input, usage->type, REL_WHEEL, -value); | 466 | input_event(input, usage->type, REL_WHEEL, -value); |
| 439 | return 1; | 467 | return 1; |
| 440 | } | 468 | } |
| 469 | |||
| 470 | /* Gyration MCE remote "Sleep" key */ | ||
| 471 | if (hid->vendor == VENDOR_ID_GYRATION && | ||
| 472 | hid->product == DEVICE_ID_GYRATION_REMOTE && | ||
| 473 | (usage->hid & HID_USAGE_PAGE) == HID_UP_GENDESK && | ||
| 474 | (usage->hid & 0xff) == 0x82) { | ||
| 475 | input_event(input, usage->type, usage->code, 1); | ||
| 476 | input_sync(input); | ||
| 477 | input_event(input, usage->type, usage->code, 0); | ||
| 478 | input_sync(input); | ||
| 479 | return 1; | ||
| 480 | } | ||
| 441 | return 0; | 481 | return 0; |
| 442 | } | 482 | } |
| 443 | 483 | ||
