16 #include <linux/device.h>
17 #include <linux/hid.h>
18 #include <linux/module.h>
30 #define EASYPEN_I405X_RDESC_ORIG_SIZE 476
33 static __u8 easypen_i405x_rdesc_fixed[] = {
93 #define MOUSEPEN_I608X_RDESC_ORIG_SIZE 476
96 static __u8 mousepen_i608x_rdesc_fixed[] = {
197 #define EASYPEN_M610X_RDESC_ORIG_SIZE 476
200 static __u8 easypen_m610x_rdesc_fixed[] = {
240 0x27, 0x00, 0xA0, 0x00, 0x00,
286 rdesc[61] == 0x05 && rdesc[62] == 0x08 &&
287 rdesc[63] == 0x19 && rdesc[64] == 0x08 &&
288 rdesc[65] == 0x29 && rdesc[66] == 0x0f &&
289 rdesc[71] == 0x75 && rdesc[72] == 0x08 &&
290 rdesc[73] == 0x95 && rdesc[74] == 0x01) {
292 "fixing up Kye/Genius Ergo Mouse "
293 "report descriptor\n");
303 rdesc = easypen_i405x_rdesc_fixed;
304 *rsize =
sizeof(easypen_i405x_rdesc_fixed);
309 rdesc = mousepen_i608x_rdesc_fixed;
310 *rsize =
sizeof(mousepen_i608x_rdesc_fixed);
315 rdesc = easypen_m610x_rdesc_fixed;
316 *rsize =
sizeof(easypen_m610x_rdesc_fixed);
331 static int kye_tablet_enable(
struct hid_device *hdev)
346 hid_err(hdev,
"tablet-enabling feature report not found\n");
350 if (report->
maxfield < 1 || report->
field[0]->report_count < 7) {
351 hid_err(hdev,
"invalid tablet-enabling feature report\n");
355 value = report->
field[0]->value;
373 ret = hid_parse(hdev);
375 hid_err(hdev,
"parse failed\n");
381 hid_err(hdev,
"hw start failed\n");
389 ret = kye_tablet_enable(hdev);
391 hid_err(hdev,
"tablet enabling failed\n");
418 .id_table = kye_devices,
420 .report_fixup = kye_report_fixup,
423 static int __init kye_init(
void)
428 static void __exit kye_exit(
void)