1515
1616#include "hid-ids.h"
1717
18+ /* Data gathered from Database/VID0458_PID????/Vista/TBoard/default.xml in ioTablet driver
19+ *
20+ * TODO:
21+ * - Add battery and sleep support for EasyPen M406W and MousePen M508WX
22+ * - Investigate ScrollZ.MiceFMT buttons of EasyPen M406
23+ */
24+
25+ static const __u8 easypen_m406_control_rdesc [] = {
26+ 0x05 , 0x0C , /* Usage Page (Consumer), */
27+ 0x09 , 0x01 , /* Usage (Consumer Control), */
28+ 0xA1 , 0x01 , /* Collection (Application), */
29+ 0x85 , 0x12 , /* Report ID (18), */
30+ 0x0A , 0x45 , 0x02 , /* Usage (AC Rotate), */
31+ 0x09 , 0x40 , /* Usage (Menu), */
32+ 0x0A , 0x2F , 0x02 , /* Usage (AC Zoom), */
33+ 0x0A , 0x46 , 0x02 , /* Usage (AC Resize), */
34+ 0x0A , 0x1A , 0x02 , /* Usage (AC Undo), */
35+ 0x0A , 0x6A , 0x02 , /* Usage (AC Delete), */
36+ 0x0A , 0x24 , 0x02 , /* Usage (AC Back), */
37+ 0x0A , 0x25 , 0x02 , /* Usage (AC Forward), */
38+ 0x14 , /* Logical Minimum (0), */
39+ 0x25 , 0x01 , /* Logical Maximum (1), */
40+ 0x75 , 0x01 , /* Report Size (1), */
41+ 0x95 , 0x08 , /* Report Count (8), */
42+ 0x81 , 0x02 , /* Input (Variable), */
43+ 0x95 , 0x30 , /* Report Count (48), */
44+ 0x81 , 0x01 , /* Input (Constant), */
45+ 0xC0 /* End Collection */
46+ };
47+
48+ static const __u8 easypen_m506_control_rdesc [] = {
49+ 0x05 , 0x0C , /* Usage Page (Consumer), */
50+ 0x09 , 0x01 , /* Usage (Consumer Control), */
51+ 0xA1 , 0x01 , /* Collection (Application), */
52+ 0x85 , 0x12 , /* Report ID (18), */
53+ 0x0A , 0x6A , 0x02 , /* Usage (AC Delete), */
54+ 0x0A , 0x1A , 0x02 , /* Usage (AC Undo), */
55+ 0x0A , 0x2D , 0x02 , /* Usage (AC Zoom In), */
56+ 0x0A , 0x2E , 0x02 , /* Usage (AC Zoom Out), */
57+ 0x14 , /* Logical Minimum (0), */
58+ 0x25 , 0x01 , /* Logical Maximum (1), */
59+ 0x75 , 0x01 , /* Report Size (1), */
60+ 0x95 , 0x04 , /* Report Count (4), */
61+ 0x81 , 0x02 , /* Input (Variable), */
62+ 0x95 , 0x34 , /* Report Count (52), */
63+ 0x81 , 0x01 , /* Input (Constant), */
64+ 0xC0 /* End Collection */
65+ };
66+
67+ static const __u8 easypen_m406w_control_rdesc [] = {
68+ 0x05 , 0x0C , /* Usage Page (Consumer), */
69+ 0x09 , 0x01 , /* Usage (Consumer Control), */
70+ 0xA1 , 0x01 , /* Collection (Application), */
71+ 0x85 , 0x12 , /* Report ID (18), */
72+ 0x0A , 0x6A , 0x02 , /* Usage (AC Delete), */
73+ 0x0A , 0x1A , 0x02 , /* Usage (AC Undo), */
74+ 0x0A , 0x01 , 0x02 , /* Usage (AC New), */
75+ 0x09 , 0x40 , /* Usage (Menu), */
76+ 0x14 , /* Logical Minimum (0), */
77+ 0x25 , 0x01 , /* Logical Maximum (1), */
78+ 0x75 , 0x01 , /* Report Size (1), */
79+ 0x95 , 0x04 , /* Report Count (4), */
80+ 0x81 , 0x02 , /* Input (Variable), */
81+ 0x95 , 0x34 , /* Report Count (52), */
82+ 0x81 , 0x01 , /* Input (Constant), */
83+ 0xC0 /* End Collection */
84+ };
85+
1886static const __u8 easypen_m610x_control_rdesc [] = {
1987 0x05 , 0x0C , /* Usage Page (Consumer), */
2088 0x09 , 0x01 , /* Usage (Consumer Control), */
@@ -58,6 +126,54 @@ static const __u8 pensketch_m912_control_rdesc[] = {
58126 0xC0 /* End Collection */
59127};
60128
129+ static const __u8 mousepen_m508wx_control_rdesc [] = {
130+ 0x05 , 0x0C , /* Usage Page (Consumer), */
131+ 0x09 , 0x01 , /* Usage (Consumer Control), */
132+ 0xA1 , 0x01 , /* Collection (Application), */
133+ 0x85 , 0x12 , /* Report ID (18), */
134+ 0x0A , 0x1A , 0x02 , /* Usage (AC Undo), */
135+ 0x0A , 0x6A , 0x02 , /* Usage (AC Delete), */
136+ 0x0A , 0x2D , 0x02 , /* Usage (AC Zoom In), */
137+ 0x0A , 0x2E , 0x02 , /* Usage (AC Zoom Out), */
138+ 0x14 , /* Logical Minimum (0), */
139+ 0x25 , 0x01 , /* Logical Maximum (1), */
140+ 0x75 , 0x01 , /* Report Size (1), */
141+ 0x95 , 0x04 , /* Report Count (4), */
142+ 0x81 , 0x02 , /* Input (Variable), */
143+ 0x95 , 0x34 , /* Report Count (52), */
144+ 0x81 , 0x01 , /* Input (Constant), */
145+ 0xC0 /* End Collection */
146+ };
147+
148+ static const __u8 mousepen_m508x_control_rdesc [] = {
149+ 0x05 , 0x0C , /* Usage Page (Consumer), */
150+ 0x09 , 0x01 , /* Usage (Consumer Control), */
151+ 0xA1 , 0x01 , /* Collection (Application), */
152+ 0x85 , 0x12 , /* Report ID (18), */
153+ 0x0A , 0x01 , 0x02 , /* Usage (AC New), */
154+ 0x09 , 0x40 , /* Usage (Menu), */
155+ 0x0A , 0x6A , 0x02 , /* Usage (AC Delete), */
156+ 0x0A , 0x1A , 0x02 , /* Usage (AC Undo), */
157+ 0x14 , /* Logical Minimum (0), */
158+ 0x25 , 0x01 , /* Logical Maximum (1), */
159+ 0x75 , 0x01 , /* Report Size (1), */
160+ 0x95 , 0x04 , /* Report Count (4), */
161+ 0x81 , 0x02 , /* Input (Variable), */
162+ 0x81 , 0x01 , /* Input (Constant), */
163+ 0x15 , 0xFF , /* Logical Minimum (-1), */
164+ 0x95 , 0x10 , /* Report Count (16), */
165+ 0x81 , 0x01 , /* Input (Constant), */
166+ 0x0A , 0x35 , 0x02 , /* Usage (AC Scroll), */
167+ 0x0A , 0x2F , 0x02 , /* Usage (AC Zoom), */
168+ 0x0A , 0x38 , 0x02 , /* Usage (AC Pan), */
169+ 0x75 , 0x08 , /* Report Size (8), */
170+ 0x95 , 0x03 , /* Report Count (3), */
171+ 0x81 , 0x06 , /* Input (Variable, Relative), */
172+ 0x95 , 0x01 , /* Report Count (1), */
173+ 0x81 , 0x01 , /* Input (Constant), */
174+ 0xC0 /* End Collection */
175+ };
176+
61177static const __u8 easypen_m406xe_control_rdesc [] = {
62178 0x05 , 0x0C , /* Usage Page (Consumer), */
63179 0x09 , 0x01 , /* Usage (Consumer Control), */
@@ -77,6 +193,22 @@ static const __u8 easypen_m406xe_control_rdesc[] = {
77193 0xC0 /* End Collection */
78194};
79195
196+ static const __u8 pensketch_t609a_control_rdesc [] = {
197+ 0x05 , 0x0C , /* Usage Page (Consumer), */
198+ 0x09 , 0x01 , /* Usage (Consumer Control), */
199+ 0xA1 , 0x01 , /* Collection (Application), */
200+ 0x85 , 0x12 , /* Report ID (18), */
201+ 0x0A , 0x6A , 0x02 , /* Usage (AC Delete), */
202+ 0x14 , /* Logical Minimum (0), */
203+ 0x25 , 0x01 , /* Logical Maximum (1), */
204+ 0x75 , 0x01 , /* Report Size (1), */
205+ 0x95 , 0x08 , /* Report Count (8), */
206+ 0x81 , 0x02 , /* Input (Variable), */
207+ 0x95 , 0x37 , /* Report Count (55), */
208+ 0x81 , 0x01 , /* Input (Constant), */
209+ 0xC0 /* End Collection */
210+ };
211+
80212/* Fix indexes in kye_tablet_report_fixup if you change this */
81213static const __u8 kye_tablet_rdesc [] = {
82214 0x06 , 0x00 , 0xFF , /* Usage Page (FF00h), */
@@ -189,21 +321,41 @@ static const struct kye_tablet_info {
189321 unsigned int control_rsize ;
190322 const __u8 * control_rdesc ;
191323} kye_tablets_info [] = {
324+ {USB_DEVICE_ID_KYE_EASYPEN_M406 , /* 0x5005 */
325+ 15360 , 10240 , 1023 , 6 , 4 , 0 , 0x13 , false,
326+ sizeof (easypen_m406_control_rdesc ), easypen_m406_control_rdesc },
327+ {USB_DEVICE_ID_KYE_EASYPEN_M506 , /* 0x500F */
328+ 24576 , 20480 , 1023 , 6 , 5 , 0 , 0x13 , false,
329+ sizeof (easypen_m506_control_rdesc ), easypen_m506_control_rdesc },
192330 {USB_DEVICE_ID_KYE_EASYPEN_I405X , /* 0x5010 */
193331 14080 , 10240 , 1023 , 55 , 40 , -1 , 0x13 , false},
194332 {USB_DEVICE_ID_KYE_MOUSEPEN_I608X , /* 0x5011 */
195333 20480 , 15360 , 2047 , 8 , 6 , 0 , 0x13 , true},
334+ {USB_DEVICE_ID_KYE_EASYPEN_M406W , /* 0x5012 */
335+ 15360 , 10240 , 1023 , 6 , 4 , 0 , 0x13 , false,
336+ sizeof (easypen_m406w_control_rdesc ), easypen_m406w_control_rdesc },
196337 {USB_DEVICE_ID_KYE_EASYPEN_M610X , /* 0x5013 */
197338 40960 , 25600 , 1023 , 1000 , 625 , -2 , 0x13 , false,
198339 sizeof (easypen_m610x_control_rdesc ), easypen_m610x_control_rdesc },
340+ {USB_DEVICE_ID_KYE_EASYPEN_340 , /* 0x5014 */
341+ 10240 , 7680 , 1023 , 4 , 3 , 0 , 0x13 , false},
199342 {USB_DEVICE_ID_KYE_PENSKETCH_M912 , /* 0x5015 */
200343 61440 , 46080 , 2047 , 12 , 9 , 0 , 0x13 , true,
201344 sizeof (pensketch_m912_control_rdesc ), pensketch_m912_control_rdesc },
345+ {USB_DEVICE_ID_KYE_MOUSEPEN_M508WX , /* 0x5016 */
346+ 40960 , 25600 , 2047 , 8 , 5 , 0 , 0x13 , true,
347+ sizeof (mousepen_m508wx_control_rdesc ), mousepen_m508wx_control_rdesc },
348+ {USB_DEVICE_ID_KYE_MOUSEPEN_M508X , /* 0x5017 */
349+ 40960 , 25600 , 2047 , 8 , 5 , 0 , 0x13 , true,
350+ sizeof (mousepen_m508x_control_rdesc ), mousepen_m508x_control_rdesc },
202351 {USB_DEVICE_ID_KYE_EASYPEN_M406XE , /* 0x5019 */
203352 15360 , 10240 , 1023 , 6 , 4 , 0 , 0x13 , false,
204353 sizeof (easypen_m406xe_control_rdesc ), easypen_m406xe_control_rdesc },
205354 {USB_DEVICE_ID_KYE_MOUSEPEN_I608X_V2 , /* 0x501A */
206355 40960 , 30720 , 2047 , 8 , 6 , 0 , 0x13 , true},
356+ {USB_DEVICE_ID_KYE_PENSKETCH_T609A , /* 0x501B */
357+ 43520 , 28160 , 1023 , 85 , 55 , -1 , 0x13 , false,
358+ sizeof (pensketch_t609a_control_rdesc ), pensketch_t609a_control_rdesc },
207359 {}
208360};
209361
@@ -425,12 +577,19 @@ static int kye_probe(struct hid_device *hdev, const struct hid_device_id *id)
425577 if (hid_hw_open (hdev ))
426578 hid_hw_close (hdev );
427579 break ;
580+ case USB_DEVICE_ID_KYE_EASYPEN_M406 :
581+ case USB_DEVICE_ID_KYE_EASYPEN_M506 :
428582 case USB_DEVICE_ID_KYE_EASYPEN_I405X :
429583 case USB_DEVICE_ID_KYE_MOUSEPEN_I608X :
584+ case USB_DEVICE_ID_KYE_EASYPEN_M406W :
430585 case USB_DEVICE_ID_KYE_EASYPEN_M610X :
586+ case USB_DEVICE_ID_KYE_EASYPEN_340 :
431587 case USB_DEVICE_ID_KYE_PENSKETCH_M912 :
588+ case USB_DEVICE_ID_KYE_MOUSEPEN_M508WX :
589+ case USB_DEVICE_ID_KYE_MOUSEPEN_M508X :
432590 case USB_DEVICE_ID_KYE_EASYPEN_M406XE :
433591 case USB_DEVICE_ID_KYE_MOUSEPEN_I608X_V2 :
592+ case USB_DEVICE_ID_KYE_PENSKETCH_T609A :
434593 ret = kye_tablet_enable (hdev );
435594 if (ret ) {
436595 hid_err (hdev , "tablet enabling failed\n" );
@@ -454,18 +613,32 @@ static const struct hid_device_id kye_devices[] = {
454613 USB_DEVICE_ID_GENIUS_MANTICORE ) },
455614 { HID_USB_DEVICE (USB_VENDOR_ID_KYE ,
456615 USB_DEVICE_ID_GENIUS_GX_IMPERATOR ) },
616+ { HID_USB_DEVICE (USB_VENDOR_ID_KYE ,
617+ USB_DEVICE_ID_KYE_EASYPEN_M406 ) },
618+ { HID_USB_DEVICE (USB_VENDOR_ID_KYE ,
619+ USB_DEVICE_ID_KYE_EASYPEN_M506 ) },
457620 { HID_USB_DEVICE (USB_VENDOR_ID_KYE ,
458621 USB_DEVICE_ID_KYE_EASYPEN_I405X ) },
459622 { HID_USB_DEVICE (USB_VENDOR_ID_KYE ,
460623 USB_DEVICE_ID_KYE_MOUSEPEN_I608X ) },
624+ { HID_USB_DEVICE (USB_VENDOR_ID_KYE ,
625+ USB_DEVICE_ID_KYE_EASYPEN_M406W ) },
461626 { HID_USB_DEVICE (USB_VENDOR_ID_KYE ,
462627 USB_DEVICE_ID_KYE_EASYPEN_M610X ) },
628+ { HID_USB_DEVICE (USB_VENDOR_ID_KYE ,
629+ USB_DEVICE_ID_KYE_EASYPEN_340 ) },
463630 { HID_USB_DEVICE (USB_VENDOR_ID_KYE ,
464631 USB_DEVICE_ID_KYE_PENSKETCH_M912 ) },
632+ { HID_USB_DEVICE (USB_VENDOR_ID_KYE ,
633+ USB_DEVICE_ID_KYE_MOUSEPEN_M508WX ) },
634+ { HID_USB_DEVICE (USB_VENDOR_ID_KYE ,
635+ USB_DEVICE_ID_KYE_MOUSEPEN_M508X ) },
465636 { HID_USB_DEVICE (USB_VENDOR_ID_KYE ,
466637 USB_DEVICE_ID_KYE_EASYPEN_M406XE ) },
467638 { HID_USB_DEVICE (USB_VENDOR_ID_KYE ,
468639 USB_DEVICE_ID_KYE_MOUSEPEN_I608X_V2 ) },
640+ { HID_USB_DEVICE (USB_VENDOR_ID_KYE ,
641+ USB_DEVICE_ID_KYE_PENSKETCH_T609A ) },
469642 { }
470643};
471644MODULE_DEVICE_TABLE (hid , kye_devices );
0 commit comments