projects
/
GitHub
/
LineageOS
/
G12
/
android_kernel_amlogic_linux-4.9.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2c3e3bf
)
HID: gyration sleep button quirk
author
Jiri Kosina
<jkosina@suse.cz>
Fri, 4 Jul 2008 13:22:53 +0000
(15:22 +0200)
committer
Jiri Kosina
<jkosina@suse.cz>
Wed, 23 Jul 2008 13:25:21 +0000
(15:25 +0200)
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>
drivers/hid/hid-input-quirks.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/hid/hid-input-quirks.c
b/drivers/hid/hid-input-quirks.c
index 4c2052c658f1465f6a8d89494b03a8783a7ba6e3..9b58cdc24cce8ddba23c76bc675b4d799012734c 100644
(file)
--- 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
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;
}