Input - wacom: remove phys field in struct wacom

This field was not used anymore, remove it.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Input - wacom: put a flag when the led are initialized

This solves a bug with the wireless receiver:
- at plug, the wireless receiver does not know which Wacom device it is
  connected to, so it does not actually creates all the LEDs
- when the tablet connects, wacom->wacom_wac.features.type is set to the
  proper device so that wacom_wac can understand the packets
- when the receiver is unplugged, it detects that a LED should have been
  created (based on wacom->wacom_wac.features.type) and tries to remove
  it: crash when removing the sysfs group.

Side effect, we can now safely call several times wacom_destroy_leds().

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Input - wacom: rework fail chain of probe

if hid_hw_start failed, the input were not unregistered.
Reorder the various label to remove the holes.

FIXME: squash this commit in the HID conversion

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Input - wacom: remove unused field data_dma

Left over from conversion from usb to hid.

FIXME: squash this commit in the HID conversion

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Input - wacom: do not reset hid drvdata until the removal is complete

In case one of the functions called to destroy the LEDs or battery needs
it.

FIXME: squash this commit in the HID conversion

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Input - wacom: rely on the HID report size to check the actual packet size

This removes an USB dependency and is more accurate: the computed pktlen
is the actual maximum size of the reports forwarded by the device.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Input - wacom: check for valid devices based on the packet size

The Intuos Pro shares three HID device in its internal hub. Two of them
are the touch interface and the pen interface. However a third boot mouse
interface exists too. The Previous USB_DEVICE_DETAILED macro in wacom_wac.c
used to filter them, but the switch to the HID subsystem removed this
capability.

We already have a pretty big list of packet size regarding the pen
of each Wacom tablet. We can use this for checking if the current hid
device is a valid pen or not.

For touch devices, some do not have a listed pktlen, and some are sharing
the same usb PID with the pen interface. Consider the list of possible
touch packet length and validate accordingly.

Given that the pktlen is correctly computed/validated, we can store it now
in the features struct instead of having a special handling in the rest of
the code.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Input - wacom: install LED/OLED sysfs files in the HID device instead of USB

Removes one more dependency over USB, but requires changes in
the user space to find the sysfs files correctly.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Input - wacom: register the input devices on top of the HID one

Matches the current behavior of the HID subsystem and removes one more
dependency over USB.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Input - wacom: remove usb dependency for siblings devices

Waom tablets can share different physical sensor on one physical device.
This 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 USB involved:
- 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 check the current list of siblings in wacom_hdev_data,
  and if he has a match, it associates itself to the matched device.

WIP: check the physical path for devices having an internal hub

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Input - wacom: register power device at the HID level

Use the HID device as the parent for the power device when dealing with
a wireless receiver.
Removes one more usb dependency.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Input - wacom: use hid_info instead of plain dev_info

Removes one more need of usb and intf.

Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>