diff options
author | Jiri Slaby <jirislaby@gmail.com> | 2008-07-24 23:35:13 +0200 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2008-10-14 23:50:54 +0200 |
commit | 949f8fef77186c7361d22e1ea6f42c76ceda42b0 (patch) | |
tree | c9917cfecd321dd9347eba8bdc47727ef84efaa1 /drivers/hid/hid-input-quirks.c | |
parent | 3b8006e51038ef263a0404756d9e190c9a9f74d5 (diff) | |
download | op-kernel-dev-949f8fef77186c7361d22e1ea6f42c76ceda42b0.zip op-kernel-dev-949f8fef77186c7361d22e1ea6f42c76ceda42b0.tar.gz |
HID: move gyration quirks
Signed-off-by: Jiri Slaby <jirislaby@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/hid-input-quirks.c')
-rw-r--r-- | drivers/hid/hid-input-quirks.c | 46 |
1 files changed, 0 insertions, 46 deletions
diff --git a/drivers/hid/hid-input-quirks.c b/drivers/hid/hid-input-quirks.c index 1a4ba03..980e745 100644 --- a/drivers/hid/hid-input-quirks.c +++ b/drivers/hid/hid-input-quirks.c @@ -16,43 +16,12 @@ #include <linux/input.h> #include <linux/hid.h> -#define map_key_clear(c) hid_map_usage_clear(hidinput, usage, bit, \ - max, EV_KEY, (c)) - -static int quirk_gyration_remote(struct hid_usage *usage, - struct hid_input *hidinput, unsigned long **bit, int *max) -{ - if ((usage->hid & HID_USAGE_PAGE) != HID_UP_LOGIVENDOR) - return 0; - - set_bit(EV_REP, hidinput->input->evbit); - switch(usage->hid & HID_USAGE) { - /* Reported on Gyration MCE Remote */ - case 0x00d: map_key_clear(KEY_HOME); break; - case 0x024: map_key_clear(KEY_DVD); break; - case 0x025: map_key_clear(KEY_PVR); break; - case 0x046: map_key_clear(KEY_MEDIA); break; - case 0x047: map_key_clear(KEY_MP3); break; - case 0x049: map_key_clear(KEY_CAMERA); break; - case 0x04a: map_key_clear(KEY_VIDEO); break; - - default: - return 0; - } - return 1; -} - -#define VENDOR_ID_GYRATION 0x0c16 -#define DEVICE_ID_GYRATION_REMOTE 0x0002 - static const struct hid_input_blacklist { __u16 idVendor; __u16 idProduct; int (*quirk)(struct hid_usage *, struct hid_input *, unsigned long **, int *); } hid_input_blacklist[] = { - { VENDOR_ID_GYRATION, DEVICE_ID_GYRATION_REMOTE, quirk_gyration_remote }, - { 0, 0, NULL } }; @@ -74,21 +43,6 @@ int hidinput_mapping_quirks(struct hid_usage *usage, int hidinput_event_quirks(struct hid_device *hid, struct hid_field *field, struct hid_usage *usage, __s32 value) { - struct input_dev *input; - - input = field->hidinput->input; - - /* Gyration MCE remote "Sleep" key */ - if (hid->vendor == VENDOR_ID_GYRATION && - hid->product == DEVICE_ID_GYRATION_REMOTE && - (usage->hid & HID_USAGE_PAGE) == HID_UP_GENDESK && - (usage->hid & 0xff) == 0x82) { - input_event(input, usage->type, usage->code, 1); - input_sync(input); - input_event(input, usage->type, usage->code, 0); - input_sync(input); - return 1; - } return 0; } |