Jason Gerecke 042628abd5 HID: wacom: Discover device_type from HID descriptor for all devices
Currently, we assume a device_type of BTN_TOOL_PEN before scanning the
HID descriptor and then change the device_type if what we discover
proves that assumption wrong. This way of doing things makes it more
difficult to figure out if a device (particularly a HID_GENERIC device)
actually does tablet/touch input or is something completley different.

This patch leaves device_type at its initial value of 0 and then calls
'wacom_parse_hid' for every device (not just those that have touch).
As we map the usages, we can set the device_type as before. After we're
finished, we can then check if the value is still zero and do whatever
is most appropriate.

Detecting the pen can be a little tricky on most Wacom devices because
the descriptors describe opaque blobs. Fortunately, older Wacom tablets
have the HID_DG_DIGITIZER usage on the pen's application collection and
newer tablets seem to have a similar vendor-defined usage that we can
trigger on.

Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Reviewed-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
2015-05-04 10:00:22 +02:00
..
2015-04-13 17:17:32 -07:00
2015-04-13 17:37:33 -07:00
2015-03-20 17:50:07 +01:00
2015-04-13 15:13:25 -07:00
2015-02-15 10:48:44 -08:00
2015-04-01 10:29:05 -07:00
2015-02-03 15:48:51 -08:00
2015-02-03 15:58:39 -08:00
2015-02-04 09:15:18 +01:00
2015-04-13 15:45:47 -07:00
2015-04-13 17:07:21 -07:00
2015-02-18 08:40:29 +01:00
2015-02-17 09:38:59 -08:00
2015-04-13 17:07:21 -07:00
2015-04-02 13:53:53 -07:00
2015-02-03 15:58:39 -08:00