Skip to content

Commit

Permalink
HID: gyration sleep button quirk
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Jiri Kosina committed Jul 23, 2008
1 parent 2c3e3bf commit 32146dc
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions drivers/hid/hid-input-quirks.c
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,18 @@ int hidinput_event_quirks(struct hid_device *hid, struct hid_field *field, struc
input_event(input, usage->type, REL_WHEEL, -value);
return 1;
}

/* 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;
}

Expand Down

0 comments on commit 32146dc

Please sign in to comment.