]> git.baikalelectronics.ru Git - kernel.git/commit
Input: wacom - remove usb dependency for siblings devices
authorBenjamin Tissoires <benjamin.tissoires@redhat.com>
Thu, 24 Jul 2014 20:01:05 +0000 (13:01 -0700)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sat, 26 Jul 2014 01:53:53 +0000 (18:53 -0700)
commit420898746d1bfdc8e0e3cab07d0b09372b2c7297
tree9d3cdeed22268d9484bbeed06a2ee84db10e16d8
parent3209b532f19495fffe9c87ef8e27a60d0615b4ec
Input: wacom - remove usb dependency for siblings devices

Wacom tablets can share different physical sensors on one physical device.
These are called siblings in the code. The current way of implementation
relies on the USB topology to be able to share data amongs those sensors.

We can replace the code to match a HID subsystem, without involving the USB
topology:
- the first probed sensor does not find any siblings in the list
  wacom_udev_list, so it creates its own wacom_hdev_data with its own
  struct hid_device
- the other sensor checks the current list of siblings in wacom_hdev_data,
  and if there is a match, it associates itself to the matched device.

To be sure that we are not associating different sensors from different
physical devices, we also check for the phys path of the hid device which
contains the USB topology.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Reviewed-by: Jason Gerecke <killertofu@gmail.com>
Tested-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
drivers/input/tablet/wacom_sys.c