From 949f8fef77186c7361d22e1ea6f42c76ceda42b0 Mon Sep 17 00:00:00 2001 From: Jiri Slaby Date: Thu, 24 Jul 2008 23:35:13 +0200 Subject: HID: move gyration quirks Signed-off-by: Jiri Slaby Signed-off-by: Jiri Kosina --- drivers/hid/hid-input-quirks.c | 46 ------------------------------------------ 1 file changed, 46 deletions(-) (limited to 'drivers/hid/hid-input-quirks.c') diff --git a/drivers/hid/hid-input-quirks.c b/drivers/hid/hid-input-quirks.c index 1a4ba031303..980e7456e26 100644 --- a/drivers/hid/hid-input-quirks.c +++ b/drivers/hid/hid-input-quirks.c @@ -16,43 +16,12 @@ #include #include -#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; } -- cgit v1.2.3-70-g09d2