]> git.baikalelectronics.ru Git - kernel.git/commit
HID: multitouch: get maxcontacts also from logical_max value
authorBenjamin Tissoires <benjamin.tissoires@gmail.com>
Wed, 14 Nov 2012 15:59:18 +0000 (16:59 +0100)
committerJiri Kosina <jkosina@suse.cz>
Thu, 15 Nov 2012 09:08:56 +0000 (10:08 +0100)
commit8c2ad0bac82c8811f5bc153cceca17d5fa1d43a8
tree1d41dd184948bc2c940a9b38fdf62add230d2b1f
parentbaa229986cdb4d55cd1e728280d589338ce18bac
HID: multitouch: get maxcontacts also from logical_max value

Win8 devices are required to present the feature "Maximum Contact Number".
Fortunately all win7 devices I've seen presents this feature.
If the current value is 0, then, the driver can get the actual supported
contact count by refering to the logical_max.
This win8 specification ensures that logical_max may not be above 250.
This also allows us to detect when devices like irtouch or stantum reports
an obviously wrong value of 255.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@gmail.com>
Acked-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/hid-multitouch.c