* [PATCH] HID: Support i2c-hid multitouch compatible Wacom touchscreens
@ 2017-04-27 13:57 Jarkko Nikula
2017-04-27 15:09 ` Benjamin Tissoires
0 siblings, 1 reply; 4+ messages in thread
From: Jarkko Nikula @ 2017-04-27 13:57 UTC (permalink / raw)
To: linux-input
Cc: Jiri Kosina, Benjamin Tissoires, Srinivas Pandruvada,
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.
Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
---
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(-)
diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index d162f0dc76e3..cfb0b7262de7 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -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
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] HID: Support i2c-hid multitouch compatible Wacom touchscreens
2017-04-27 13:57 [PATCH] HID: Support i2c-hid multitouch compatible Wacom touchscreens Jarkko Nikula
@ 2017-04-27 15:09 ` Benjamin Tissoires
2017-04-27 22:48 ` Jason Gerecke
0 siblings, 1 reply; 4+ messages in thread
From: Benjamin Tissoires @ 2017-04-27 15:09 UTC (permalink / raw)
To: Jarkko Nikula, Jason Gerecke, Ping Cheng
Cc: linux-input, Jiri Kosina, Srinivas Pandruvada
On Apr 27 2017 or thereabouts, Jarkko Nikula wrote:
> 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.
>
> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
> ---
> 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.
> 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
> ---
> drivers/hid/hid-core.c | 3 ++-
> 1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
> index d162f0dc76e3..cfb0b7262de7 100644
> --- a/drivers/hid/hid-core.c
> +++ b/drivers/hid/hid-core.c
> @@ -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
>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] HID: Support i2c-hid multitouch compatible Wacom touchscreens
2017-04-27 15:09 ` Benjamin Tissoires
@ 2017-04-27 22:48 ` Jason Gerecke
2017-04-28 6:59 ` Jarkko Nikula
0 siblings, 1 reply; 4+ messages in thread
From: Jason Gerecke @ 2017-04-27 22:48 UTC (permalink / raw)
To: Jarkko Nikula
Cc: Ping Cheng, Linux Input, Jiri Kosina, Srinivas Pandruvada,
Benjamin Tissoires
On Thu, Apr 27, 2017 at 8:09 AM, Benjamin Tissoires
<benjamin.tissoires@redhat.com> wrote:
> On Apr 27 2017 or thereabouts, Jarkko Nikula wrote:
>> 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.
>>
>> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
>> ---
>> 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.
>> 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....
>> ---
>> drivers/hid/hid-core.c | 3 ++-
>> 1 file changed, 2 insertions(+), 1 deletion(-)
>>
>> diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
>> index d162f0dc76e3..cfb0b7262de7 100644
>> --- a/drivers/hid/hid-core.c
>> +++ b/drivers/hid/hid-core.c
>> @@ -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
>>
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] HID: Support i2c-hid multitouch compatible Wacom touchscreens
2017-04-27 22:48 ` Jason Gerecke
@ 2017-04-28 6:59 ` Jarkko Nikula
0 siblings, 0 replies; 4+ messages in thread
From: Jarkko Nikula @ 2017-04-28 6:59 UTC (permalink / raw)
To: Jason Gerecke
Cc: Ping Cheng, Linux Input, Jiri Kosina, Srinivas Pandruvada,
Benjamin Tissoires
Hi
On 04/28/2017 01:48 AM, Jason Gerecke wrote:
> On Thu, Apr 27, 2017 at 8:09 AM, Benjamin Tissoires
> <benjamin.tissoires@redhat.com> wrote:
>> On Apr 27 2017 or thereabouts, Jarkko Nikula wrote:
>>> 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.
>>>
>>> Signed-off-by: Jarkko Nikula <jarkko.nikula@linux.intel.com>
>>> ---
>>> 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.
>
>>> 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.
--
Jarkko
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2017-04-28 6:59 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-27 13:57 [PATCH] HID: Support i2c-hid multitouch compatible Wacom touchscreens Jarkko Nikula
2017-04-27 15:09 ` Benjamin Tissoires
2017-04-27 22:48 ` Jason Gerecke
2017-04-28 6:59 ` Jarkko Nikula
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).