Skip to contentSkip to conversation

HID: Support i2c-hid multitouch compatible Wacom touchscreens

PATCH In review Jarkko Nikula 3 participants 4 messages Apr 27, 2017 – Apr 28, 2017 HID

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 HID: Support i2c-hid multitouch compatible Wacom touchscreens

Vendor specific handling in hid_scan_report() overrides the hid->group to HID_GROUP_WACOM for all devices with vendor ID equal to USB_VENDOR_ID_WACOM.

However there is an i2c-hid multitouch compatible Wacom touschreen which is parsed as generic HID_GROUP_MULTITOUCH_WIN_8 device but hid-multitouch doesn't probe because of this overriding.

Support this touschreen by overring the group only when the bus is different than I2C.

---
I'm not an HID expert and I don't know is there any existing Wacom tablets using the I2C bus. There are USB and Bluetooth tablets so that's the reason I'm checking id->bus != BUS_I2C when overring the group. I've done only basic testing that device is registered as an hid-multitouch device and "hexdump /dev/input/eventX" produces a bunch of hexadecimals when touschscreen is touched.

---
 drivers/hid/hid-core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/hid/hid-core.c +2 -1
index d162f0dc76e3..cfb0b7262de7 100644
@@ -816,7 +816,8 @@ static int hid_scan_report(struct hid_device *hid)
 	 */
 	switch (hid->vendor) {
 	case USB_VENDOR_ID_WACOM:
-		hid->group = HID_GROUP_WACOM;
+		if (hid->bus != BUS_I2C)
+			hid->group = HID_GROUP_WACOM;
 		break;
 	case USB_VENDOR_ID_SYNAPTICS:
 		if (hid->group == HID_GROUP_GENERIC)
Signature · 1 line
2.11.0
#1 lore raw
Quoted 8 lines · Jarkko Nikula

Vendor specific handling in hid_scan_report() overrides the hid->group to HID_GROUP_WACOM for all devices with vendor ID equal to USB_VENDOR_ID_WACOM.

However there is an i2c-hid multitouch compatible Wacom touschreen which is parsed as generic HID_GROUP_MULTITOUCH_WIN_8 device but hid-multitouch doesn't probe because of this overriding.

Quoted 7 lines

Support this touschreen by overring the group only when the bus is different than I2C.

---
I'm not an HID expert and I don't know is there any existing Wacom tablets using the I2C bus. There are USB and Bluetooth tablets so that's

I'd say there are other I2C Wacom tablets. Jason and Ping can confirm.

Quoted 4 lines

the reason I'm checking id->bus != BUS_I2C when overring the group. I've done only basic testing that device is registered as an hid-multitouch device and "hexdump /dev/input/eventX" produces a bunch of hexadecimals when touschscreen is touched.

What's the issue of having wacom.ko loaded for this particular touchscreen? wacom.ko should handle it properly.

Cheers,
Benjamin

Quoted 21 lines
---
 drivers/hid/hid-core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/hid/hid-core.c +2 -1
index d162f0dc76e3..cfb0b7262de7 100644
@@ -816,7 +816,8 @@ static int hid_scan_report(struct hid_device *hid)
 	 */
 	switch (hid->vendor) {
 	case USB_VENDOR_ID_WACOM:
-		hid->group = HID_GROUP_WACOM;
+		if (hid->bus != BUS_I2C)
+			hid->group = HID_GROUP_WACOM;
 		break;
 	case USB_VENDOR_ID_SYNAPTICS:
 		if (hid->group == HID_GROUP_GENERIC)
Signature · 1 line
2.11.0
#2 lore raw
Quoted 12 lines · Benjamin Tissoires
Quoted 11 lines · Jarkko Nikula

Vendor specific handling in hid_scan_report() overrides the hid->group to HID_GROUP_WACOM for all devices with vendor ID equal to USB_VENDOR_ID_WACOM.

However there is an i2c-hid multitouch compatible Wacom touschreen which is parsed as generic HID_GROUP_MULTITOUCH_WIN_8 device but hid-multitouch doesn't probe because of this overriding.

Support this touschreen by overring the group only when the bus is different than I2C.

Quoted 7 lines
Quoted 4 lines

---
I'm not an HID expert and I don't know is there any existing Wacom tablets using the I2C bus. There are USB and Bluetooth tablets so that's

I'd say there are other I2C Wacom tablets. Jason and Ping can confirm.

Absolutely. There are a number of I2C tablets out there. The device table for wacom.ko includes "{ I2C_DEVICE_WACOM(HID_ANY_ID) }" so that we can attempt to handle them.

Quoted 11 lines
Quoted 4 lines

the reason I'm checking id->bus != BUS_I2C when overring the group. I've done only basic testing that device is registered as an hid-multitouch device and "hexdump /dev/input/eventX" produces a bunch of hexadecimals when touschscreen is touched.

What's the issue of having wacom.ko loaded for this particular touchscreen? wacom.ko should handle it properly.

Cheers,
Benjamin

I'm wondering the same thing. It looks like the vendor-specific overrides occur after HID_GROUP_MULTITOUCH_WIN_8 would have been set... Is the wacom module not a part of your kernel?

Jason
---
Now instead of four in the eights place /
you’ve got three, ‘Cause you added one /
(That is to say, eight) to the two, /
But you can’t take seven from three, /
So you look at the sixty-fours....

Quoted 21 lines
Quoted 21 lines
---
 drivers/hid/hid-core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
drivers/hid/hid-core.c +2 -2
index d162f0dc76e3..cfb0b7262de7 100644
@@ -816,7 +816,8 @@ static int hid_scan_report(struct hid_device *hid)
       */
      switch (hid->vendor) {
      case USB_VENDOR_ID_WACOM:
-             hid->group = HID_GROUP_WACOM;
+             if (hid->bus != BUS_I2C)
+                     hid->group = HID_GROUP_WACOM;
              break;
      case USB_VENDOR_ID_SYNAPTICS:
              if (hid->group == HID_GROUP_GENERIC)
--

2.11.0

#3 lore raw

Hi

Quoted 19 lines · Jason Gerecke
Quoted 17 lines · Benjamin Tissoires
Quoted 15 lines · Jarkko Nikula

Vendor specific handling in hid_scan_report() overrides the hid->group to HID_GROUP_WACOM for all devices with vendor ID equal to USB_VENDOR_ID_WACOM.

However there is an i2c-hid multitouch compatible Wacom touschreen which is parsed as generic HID_GROUP_MULTITOUCH_WIN_8 device but hid-multitouch doesn't probe because of this overriding.

Support this touschreen by overring the group only when the bus is different than I2C.

---
I'm not an HID expert and I don't know is there any existing Wacom tablets using the I2C bus. There are USB and Bluetooth tablets so that's

Quoted 15 lines
Quoted 2 lines

I'd say there are other I2C Wacom tablets. Jason and Ping can confirm.

Absolutely. There are a number of I2C tablets out there. The device table for wacom.ko includes "{ I2C_DEVICE_WACOM(HID_ANY_ID) }" so that we can attempt to handle them.

Quoted 8 lines
Quoted 4 lines

the reason I'm checking id->bus != BUS_I2C when overring the group. I've done only basic testing that device is registered as an hid-multitouch device and "hexdump /dev/input/eventX" produces a bunch of hexadecimals when touschscreen is touched.

What's the issue of having wacom.ko loaded for this particular touchscreen? wacom.ko should handle it properly.

Cool, it appears to handle it. I just didn't have CONFIG_HID_WACOM enabled. I thought the hid-multitouch should handle it as the HID and report descriptors looked similar than other I2C HID touchspanels I have here.

So please discard this patch.

Signature · 1 line
Jarkko