aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/hid
diff options
context:
space:
mode:
authorJiri Kosina <jkosina@suse.cz>2008-07-04 09:22:53 -0400
committerJiri Kosina <jkosina@suse.cz>2008-07-23 09:25:21 -0400
commit32146dc90860b3847b945fdb220a7d86c1ead92a (patch)
tree1cd060788a82fee14cbe2463d03a0cc5c42bc029 /drivers/hid
parent2c3e3bfbb667f486579d6742b481058e4316dafd (diff)
HID: gyration sleep button quirk
This patch is based on one provided by Jiri Kosina to handle the sleep button. I just added some cleanup and integrated it into my series. Signed-off-by: Daniel Walker <dwalker@mvista.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid')
-rw-r--r--drivers/hid/hid-input-quirks.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/hid/hid-input-quirks.c b/drivers/hid/hid-input-quirks.c
index 4c2052c658f1..9b58cdc24cce 100644
--- a/drivers/hid/hid-input-quirks.c
+++ b/drivers/hid/hid-input-quirks.c
@@ -438,6 +438,18 @@ int hidinput_event_quirks(struct hid_device *hid, struct hid_field *field, struc
438 input_event(input, usage->type, REL_WHEEL, -value); 438 input_event(input, usage->type, REL_WHEEL, -value);
439 return 1; 439 return 1;
440 } 440 }
441
442 /* Gyration MCE remote "Sleep" key */
443 if (hid->vendor == VENDOR_ID_GYRATION &&
444 hid->product == DEVICE_ID_GYRATION_REMOTE &&
445 (usage->hid & HID_USAGE_PAGE) == HID_UP_GENDESK &&
446 (usage->hid & 0xff) == 0x82) {
447 input_event(input, usage->type, usage->code, 1);
448 input_sync(input);
449 input_event(input, usage->type, usage->code, 0);
450 input_sync(input);
451 return 1;
452 }
441 return 0; 453 return 0;
442} 454}
443 455