]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
HID: wacom: Treat features->device_type values as flags
authorJason Gerecke <killertofu@gmail.com>
Tue, 16 Jun 2015 01:01:42 +0000 (18:01 -0700)
committerJiri Kosina <jkosina@suse.cz>
Thu, 18 Jun 2015 08:42:39 +0000 (10:42 +0200)
commitaa86b18cc9cd147b40412a2d57b383a5e16fe3b5
tree5eb7432d73c86e3008f42fcc38013ff7e9b8ccaf
parent44b5250b97a0e5c3a257430ea28b10cf73899bd4
HID: wacom: Treat features->device_type values as flags

The USB devices that this driver has historically supported segregate the
pen and touch portions of the tablet. Oftentimes the segregation would be
done at the interface level, though on occasion (e.g. Cintiq 24HDT) the
tablet would combine two totally independent USB devices behind an internal
USB hub. Because pen and touch never shared the same interface, it made
sense for the 'device_type' to store a single value: "pen" or "touch".

Recently, however, some I2C devices have been created which combine the
two. A first step to accomodating this is to expand 'device_type' so that
it can represent two (or potentially more) types simultaneously. To do
this, we treat it as a bitfield and set/check individual bits rather
than using the '=' and '==' operators.

This should not result in any functional change since no supported devices
(that I'm aware of, at least) have HID descriptors that indicate both
pen and touch reports on a single interface.

Signed-off-by: Jason Gerecke <jason.gerecke@wacom.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
drivers/hid/wacom_sys.c
drivers/hid/wacom_wac.c
drivers/hid/wacom_wac.h