summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2014-11-27 14:04:29 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2014-11-28 14:02:56 +0000
commitef7ea3869ce34b59df146d74e9c7c96ae8a2de2a (patch)
tree8a7f1c525262270f621bbd9272709986531f5aa6 /meta
parentc5ebca28b73538f93e7031e96e7e1c342131429b (diff)
downloadpoky-ef7ea3869ce34b59df146d74e9c7c96ae8a2de2a.tar.gz
qemu: Add missing wacom HID descriptor
The wacom driver we use is missing a HID descriptor causing it not to work with 3.17 kernels and later. This patch adds in a descriptor to make the driver work again. (From OE-Core rev: 51200e0151f0a3b0ed06649ffe77ef20bb296499) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-devtools/qemu/qemu.inc1
-rw-r--r--meta/recipes-devtools/qemu/qemu/wacom.patch130
2 files changed, 131 insertions, 0 deletions
diff --git a/meta/recipes-devtools/qemu/qemu.inc b/meta/recipes-devtools/qemu/qemu.inc
index c8b400a366..3f68a56bd3 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -16,6 +16,7 @@ SRC_URI = "\
16 file://larger_default_ram_size.patch \ 16 file://larger_default_ram_size.patch \
17 file://disable-grabs.patch \ 17 file://disable-grabs.patch \
18 file://exclude-some-arm-EABI-obsolete-syscalls.patch \ 18 file://exclude-some-arm-EABI-obsolete-syscalls.patch \
19 file://wacom.patch \
19 " 20 "
20 21
21SRC_URI_append_class-native = "\ 22SRC_URI_append_class-native = "\
diff --git a/meta/recipes-devtools/qemu/qemu/wacom.patch b/meta/recipes-devtools/qemu/qemu/wacom.patch
new file mode 100644
index 0000000000..cd06aa4ac6
--- /dev/null
+++ b/meta/recipes-devtools/qemu/qemu/wacom.patch
@@ -0,0 +1,130 @@
1The USB wacom device is missing a HID descriptor which causes it
2to fail to operate with recent kernels (e.g. 3.17).
3
4This patch adds a HID desriptor to the device, based upon one from
5real wcom device.
6
7Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
8
9Upstream-Status: Submitted
102014/11/27
11
12Index: qemu-2.1.0/hw/usb/dev-wacom.c
13===================================================================
14--- qemu-2.1.0.orig/hw/usb/dev-wacom.c 2014-08-01 15:12:17.000000000 +0100
15+++ qemu-2.1.0/hw/usb/dev-wacom.c 2014-10-12 12:13:30.540306042 +0100
16@@ -68,6 +68,89 @@
17 [STR_SERIALNUMBER] = "1",
18 };
19
20+static const uint8_t qemu_tablet_hid_report_descriptor[] = {
21+ 0x05, 0x01, /* Usage Page (Generic Desktop) */
22+ 0x09, 0x02, /* Usage (Mouse) */
23+ 0xa1, 0x01, /* Collection (Application) */
24+ 0x85, 0x01, /* Report ID (1) */
25+ 0x09, 0x01, /* Usage (Pointer) */
26+ 0xa1, 0x00, /* Collection (Physical) */
27+ 0x05, 0x09, /* Usage Page (Button) */
28+ 0x19, 0x01, /* Usage Minimum (1) */
29+ 0x29, 0x05, /* Usage Maximum (5) */
30+ 0x15, 0x00, /* Logical Minimum (0) */
31+ 0x25, 0x01, /* Logical Maximum (1) */
32+ 0x95, 0x05, /* Report Count (5) */
33+ 0x75, 0x01, /* Report Size (1) */
34+ 0x81, 0x02, /* Input (Data, Variable, Absolute) */
35+ 0x95, 0x01, /* Report Count (1) */
36+ 0x75, 0x03, /* Report Size (3) */
37+ 0x81, 0x01, /* Input (Constant) */
38+ 0x05, 0x01, /* Usage Page (Generic Desktop) */
39+ 0x09, 0x30, /* Usage (X) */
40+ 0x09, 0x31, /* Usage (Y) */
41+ 0x15, 0x81, /* Logical Minimum (-127) */
42+ 0x25, 0x7f, /* Logical Maximum (127) */
43+ 0x75, 0x08, /* Report Size (8) */
44+ 0x95, 0x02, /* Report Count (2) */
45+ 0x81, 0x06, /* Input (Data, Variable, Relative) */
46+ 0xc0, /* End Collection */
47+ 0xc0, /* End Collection */
48+ 0x05, 0x0d, /* Usage Page (Digitizer) */
49+ 0x09, 0x01, /* Usage (Digitizer) */
50+ 0xa1, 0x01, /* Collection (Application) */
51+ 0x85, 0x02, /* Report ID (2) */
52+ 0xa1, 0x00, /* Collection (Physical) */
53+ 0x06, 0x00, 0xff, /* Usage Page (Vendor 0xff00) */
54+ 0x09, 0x01, /* Usage (Digitizer) */
55+ 0x15, 0x00, /* Logical Minimum (0) */
56+ 0x26, 0xff, 0x00, /* Logical Maximum (255) */
57+ 0x75, 0x08, /* Report Size (8) */
58+ 0x95, 0x08, /* Report Count (8) */
59+ 0x81, 0x02, /* Input (Data, Variable, Absolute) */
60+ 0xc0, /* End Collection */
61+ 0x09, 0x01, /* Usage (Digitizer) */
62+ 0x85, 0x02, /* Report ID (2) */
63+ 0x95, 0x01, /* Report Count (1) */
64+ 0xb1, 0x02, /* FEATURE (2) */
65+ 0xc0, /* End Collection */
66+ 0x06, 0x00, 0xff, /* Usage Page (Vendor 0xff00) */
67+ 0x09, 0x01, /* Usage (Digitizer) */
68+ 0xa1, 0x01, /* Collection (Application) */
69+ 0x85, 0x02, /* Report ID (2) */
70+ 0x05, 0x0d, /* Usage Page (Digitizer) */
71+ 0x09, 0x22, /* Usage (Finger) */
72+ 0xa1, 0x00, /* Collection (Physical) */
73+ 0x06, 0x00, 0xff, /* Usage Page (Vendor 0xff00) */
74+ 0x09, 0x01, /* Usage (Digitizer) */
75+ 0x15, 0x00, /* Logical Minimum (0) */
76+ 0x26, 0xff, 0x00, /* Logical Maximum */
77+ 0x75, 0x08, /* Report Size (8) */
78+ 0x95, 0x02, /* Report Count (2) */
79+ 0x81, 0x02, /* Input (Data, Variable, Absolute) */
80+ 0x05, 0x01, /* Usage Page (Generic Desktop) */
81+ 0x09, 0x30, /* Usage (X) */
82+ 0x35, 0x00, /* Physical Minimum */
83+ 0x46, 0xe0, 0x2e, /* Physical Maximum */
84+ 0x26, 0xe0, 0x01, /* Logical Maximum */
85+ 0x75, 0x10, /* Report Size (16) */
86+ 0x95, 0x01, /* Report Count (1) */
87+ 0x81, 0x02, /* Input (Data, Variable, Absolute) */
88+ 0x09, 0x31, /* Usage (Y) */
89+ 0x46, 0x40, 0x1f, /* Physical Maximum */
90+ 0x26, 0x40, 0x01, /* Logical Maximum */
91+ 0x81, 0x02, /* Input (Data, Variable, Absolute) */
92+ 0x06, 0x00, 0xff, /* Usage Page (Vendor 0xff00) */
93+ 0x09, 0x01, /* Usage (Digitizer) */
94+ 0x26, 0xff, 0x00, /* Logical Maximum */
95+ 0x75, 0x08, /* Report Size (8) */
96+ 0x95, 0x0d, /* Report Count (13) */
97+ 0x81, 0x02, /* Input (Data, Variable, Absolute) */
98+ 0xc0, /* End Collection */
99+ 0xc0, /* End Collection */
100+};
101+
102+
103 static const USBDescIface desc_iface_wacom = {
104 .bInterfaceNumber = 0,
105 .bNumEndpoints = 1,
106@@ -85,7 +168,7 @@
107 0x00, /* u8 country_code */
108 0x01, /* u8 num_descriptors */
109 0x22, /* u8 type: Report */
110- 0x6e, 0, /* u16 len */
111+ sizeof(qemu_tablet_hid_report_descriptor), 0, /* u16 len */
112 },
113 },
114 },
115@@ -265,6 +350,15 @@
116 }
117
118 switch (request) {
119+ case InterfaceRequest | USB_REQ_GET_DESCRIPTOR:
120+ switch (value >> 8) {
121+ case 0x22:
122+ memcpy(data, qemu_tablet_hid_report_descriptor,
123+ sizeof(qemu_tablet_hid_report_descriptor));
124+ p->actual_length = sizeof(qemu_tablet_hid_report_descriptor);
125+ break;
126+ }
127+ break;
128 case WACOM_SET_REPORT:
129 if (s->mouse_grabbed) {
130 qemu_remove_mouse_event_handler(s->eh_entry);