-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
yaml --- r: 140403 b: refs/heads/master c: 7942274 h: refs/heads/master i: 140401: 4f4f4b6 140399: 53c1afa v: v3
- Loading branch information
Jiri Kosina
committed
Mar 30, 2009
1 parent
7a3a51a
commit 72a479a
Showing
7 changed files
with
86 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
--- | ||
refs/heads/master: fef3f571ecc2a82395c531d97b3f71a59e04e946 | ||
refs/heads/master: 794227415f8f5f395a9ed4269a4ee7a3c34f66a5 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
/* | ||
* HID driver for Kye/Genius devices not fully compliant with HID standard | ||
* | ||
* Copyright (c) 2009 Jiri Kosina | ||
* Copyright (c) 2009 Tomas Hanak | ||
*/ | ||
|
||
/* | ||
* This program is free software; you can redistribute it and/or modify it | ||
* under the terms of the GNU General Public License as published by the Free | ||
* Software Foundation; either version 2 of the License, or (at your option) | ||
* any later version. | ||
*/ | ||
|
||
#include <linux/device.h> | ||
#include <linux/hid.h> | ||
#include <linux/module.h> | ||
|
||
#include "hid-ids.h" | ||
|
||
/* the fixups that need to be done: | ||
* - change led usage page to button for extra buttons | ||
* - report size 8 count 1 must be size 1 count 8 for button bitfield | ||
* - change the button usage range to 4-7 for the extra buttons | ||
*/ | ||
static void kye_report_fixup(struct hid_device *hdev, __u8 *rdesc, | ||
unsigned int rsize) | ||
{ | ||
if (rsize >= 74 && | ||
rdesc[61] == 0x05 && rdesc[62] == 0x08 && | ||
rdesc[63] == 0x19 && rdesc[64] == 0x08 && | ||
rdesc[65] == 0x29 && rdesc[66] == 0x0f && | ||
rdesc[71] == 0x75 && rdesc[72] == 0x08 && | ||
rdesc[73] == 0x95 && rdesc[74] == 0x01) { | ||
dev_info(&hdev->dev, "fixing up Kye/Genius Ergo Mouse report " | ||
"descriptor\n"); | ||
rdesc[62] = 0x09; | ||
rdesc[64] = 0x04; | ||
rdesc[66] = 0x07; | ||
rdesc[72] = 0x01; | ||
rdesc[74] = 0x08; | ||
} | ||
} | ||
|
||
static const struct hid_device_id kye_devices[] = { | ||
{ HID_USB_DEVICE(USB_VENDOR_ID_KYE, USB_DEVICE_ID_KYE_ERGO_525V) }, | ||
{ } | ||
}; | ||
MODULE_DEVICE_TABLE(hid, kye_devices); | ||
|
||
static struct hid_driver kye_driver = { | ||
.name = "kye", | ||
.id_table = kye_devices, | ||
.report_fixup = kye_report_fixup, | ||
}; | ||
|
||
static int kye_init(void) | ||
{ | ||
return hid_register_driver(&kye_driver); | ||
} | ||
|
||
static void kye_exit(void) | ||
{ | ||
hid_unregister_driver(&kye_driver); | ||
} | ||
|
||
module_init(kye_init); | ||
module_exit(kye_exit); | ||
MODULE_LICENSE("GPL"); | ||
|
||
HID_COMPAT_LOAD_DRIVER(kye); |