Scan all children connected to the parent hub

Instead of bailing at the first NULL child (i.e., the first non-
connected port), go through all ports and simply skip any NULL
children. This condition occurs in the Cintiq Companion Hybrid
when trying to locate the other "half" (i.e. pen or touch device)
of the tablet.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Acked-by: Chris Bagwell <chris@cnpbagwell.com>
backport: Support EMR and MFT sensors of Cintiq Companion Hybrid

Adds support for the sensors integrated in to the Cintiq Companion
Hybrid. These sensors use by-and-large the same protocol as the
Cintiq 24HD touch.

NOTE: The ExpressKeys on the Cintiq Companion Hybrid are wired to
both the EMR controller and CPU GPIO pins. It may be necessary to
disable their functionality in this driver if building a custom
Android kernel for this device (lest two events be sent to userspace
for every button press).

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Acked-by: Chris Bagwell <chris@cnpbagwell.com>
Fix spurious SOURCE_STYLUS attribute for MFT under Android

Under Android, the MFT sensor of the Cintiq Companion Hybrid is
being assigned a SOURCE_STYLUS attribute, in addition to its
expected SOURCE_TOUCHSCREEN. This is caused by the
MultiTouchMotionAccumulator (InputReader.cpp) assuming that a
stylus may be used with any device advertising the
ABS_MT_TOOL_TYPE axis.

This patch removes our advertising of that particular axis for
the MFT sensor.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Acked-by: Chris Bagwell <chris@cnpbagwell.com>
backport: Send proper tablet state info when pen leaves proximity

The EMR sensor of Intuos4 and newer devices can send a packet with
0x20 in its second byte which contains only location information.
This packet is sent when the pen is too far away to reliably obtain
other information. Because only the location is updated userspace
will continue to see stale information for other values, most notably
TOUCH, PRESSURE, and DISTANCE.

This patch ensures userspace is not left with stale device state
information when the pen re-enters proximity (possibly leading to
the assumption the pen is still in contact even though it is
actually hovering).

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Acked-by: Chris Bagwell <chris@cnpbagwell.com>
Input: wacom - testing result shows get_report is unnecessary.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Acked-by: Chris Bagwell <chris@cnpbagwell.com>
Input: wacom - LED is only supported through digitizer interface

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Acked-by: Chris Bagwell <chris@cnpbagwell.com>
Input: wacom - add support for three new Intuos Pro devices

Acked-by: Chris Bagwell <chris@cnpbagwell.com>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Fix Intuos5 and Intuos Pro touch interfaces on 2.6.30+

The touch interfaces on for these two devices have not been set
up properly and will likely be mis-detected by xf86-input-wacom
and result in a non-functional touch device. This patch ensures
the driver declares the appropriate axes for the pen and touch
interfaces, and routes touches from both through the appropriate
IRQ method.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Acked-by: Chris Bagwell <chris@cnpbagwell.com>
Declare ABS_X and ABS_Y for all device types on 2.6.38

Devices capable of >2 touches were not declaring support for the ABS_X
and ABS_Y axes despite using pointer emulation. The 3.7+ kernel already
takes care of this for us (so there's no need to forward-port these
changes), but we need to be sure that they are declared under 2.6.38+
lest xf86-input-wacom ignore the device.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Acked-by: Chris Bagwell <chris@cnpbagwell.com>
input-wacom 0.19.0

Signed-off-by: Jason Gerecke <killertofu@gmail.com>