summaryrefslogtreecommitdiff
path: root/drivers/hid/wacom_sys.c
diff options
context:
space:
mode:
authorJason Gerecke <killertofu@gmail.com>2018-06-25 23:24:34 +0300
committerJiri Kosina <jkosina@suse.cz>2018-07-03 13:07:52 +0300
commit29b9e14846f1ff201c4c1ba4fdb868dcdce6c760 (patch)
treed8d5c2853ac7f97adc711ca30e98676fabaecf67 /drivers/hid/wacom_sys.c
parent81e97f01371f4e1701feeafe484665112cd9ddc2 (diff)
downloadlinux-29b9e14846f1ff201c4c1ba4fdb868dcdce6c760.tar.xz
HID: wacom: Replace touch_max fixup code with static touch_max definitions
Detecting the number of supported touches for a particular device used to be tricky, both because early forms of the driver didn't have a very good HID parser and because early hardware didn't always advertise the actual number. At the time, we added a block of code which would ensure that touch_max would always be equal to at least 1 on any touch device, and relied on setting touch_max to e.g. 2 only for the multitouch-capable exceptions. The common case has since flipped, and the driver and descriptors can reliably detect the number of touches supported by modern sensors. Because of this, it makes sense to remove the fixup code and instead place static declarations of "touch_max = 1" for these old devices. It isn't entirely clear if all 2-finger devices actually report a maximum number of touches so we leave these declarations still in place. For the eagle-eyed, the "> BAMBOO_PT" condition was originally equivalent to ">= TABLETPC", which is what the intent was. This commit doesn't have to consider the types introduced in the interim since they shouldn't be affected, hence why only the tablet PC definitions have been modified. Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com> Reviewed-by: Ping Cheng <ping.cheng@wacom.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
Diffstat (limited to 'drivers/hid/wacom_sys.c')
-rw-r--r--drivers/hid/wacom_sys.c10
1 files changed, 0 insertions, 10 deletions
diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
index d6797535fff9..6b67c6907caa 100644
--- a/drivers/hid/wacom_sys.c
+++ b/drivers/hid/wacom_sys.c
@@ -362,16 +362,6 @@ static void wacom_usage_mapping(struct hid_device *hdev,
return;
/*
- * Bamboo models do not support HID_DG_CONTACTMAX.
- * And, Bamboo Pen only descriptor contains touch.
- */
- if (features->type > BAMBOO_PT) {
- /* ISDv4 touch devices at least supports one touch point */
- if (finger && !features->touch_max)
- features->touch_max = 1;
- }
-
- /*
* ISDv4 devices which predate HID's adoption of the
* HID_DG_BARELSWITCH2 usage use 0x000D0000 in its
* position instead. We can accurately detect if a