• Jason Gerecke's avatar
    HID: wacom: Replace touch_max fixup code with static touch_max definitions · 29b9e148
    Jason Gerecke authored
    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: default avatarJason Gerecke <jason.gerecke@wacom.com>
    Reviewed-by: default avatarPing Cheng <ping.cheng@wacom.com>
    Signed-off-by: default avatarJiri Kosina <jkosina@suse.cz>
    29b9e148
wacom_wac.c 148 KB