Add support to ISDV4 0x100 and 0x101

Both are 10 finger-MT devices, where 0x101 is penabled.

Signed-off-by: Ping Cheng <pinglinux@gmail.com>
Add INPUT_PROP_DIRECT flag to Cintiq 24HD

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
dbg() is not supported by newer kernels (3.7 and later)

Use dev_dbg() instead.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
backport: add support for EMR on Cintiq 24HD touch

Backported for 2.6.30, 2.6.36, 2.6.38, and 3.7.

Adds support for the EMR digitizer on the Cintiq 24HD touch. The
EMR digitizer should work identically to that found on the Cintiq
24HD. The touch digitizer is a separate USB device similar to how
we split apart some other devices.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
backport: report correct touch contact size for I5/Bamboo

Backported for 2.6.38 and 3.7.

This changes how the touch packets for Intuos5 and 3rd-gen Bamboo
are interpreted, so that proper values for the MAJOR and MINOR
axes are reported. Instead of using the amplitude field (data[6]),
we use the size field (data[5]) and do some calculation to
transform it from a scaled-down area into axis lengths.

Note that even though we assume a circular contact, both MAJOR and
MINOR are reported since the resolution of the X and Y axes differ.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
backport: allow any multi-input Intuos device to set prox

Backported for 2.6.38 and 3.7.

The ability to set the proximity flag should apply to any device
that has both pen and touch input. Rather than listing classes of
devices known to meet this criteria, simply filter on the quirk
defining all such devices.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
backport: handle split-sensor devices with internal hubs

Backported for 2.6.38 and 3.7.

Like our other pen-and-touch products, the Cintiq 24HD touch
needs data to be shared between its two sensors to facilitate
proximity-based palm rejection.

Unlike other tablets that report sensor data through separate
interfaces of the same USB device, the Cintiq 24HD touch has
separate USB devices that are connected to an internal USB hub.

This patch makes it possible to designate the USB VID/PID of
the other device so that the two may share data. To ensure
we don't accidentally link to a sensor from a physically separate
device (if several have been plugged in), we limit the search
to siblings (i.e., devices directly connected to the same
hub).

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

Backported for 2.6.38 and 3.7.

The Cintiq 24HD touch cannot use wacom_set_phy_from_res to determine
the physical size of the touch sensor since the pen and touch are
on separate USB devices. The physical size is, however, provided in
the HID descriptor, just scaled to a unit we don't use.

This patch introduces the function wacom_fix_phy_from_hid to let
us make use of the unit and exponent data provided by HID to set
the [xy]_phy variables to an appropriate value. This function
relies on a trimmed-down version of hidinput_calc_abs_res from
the hid-input.c.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
backport: clean up wacom_query_tablet_data

Backported for 2.6.38 and 3.7.

Rewrites this function to be easier to read and understand. The new
function 'wacom_set_device_mode' now handles the grunt work of
assembling the proper feature report, sending it to the device,
and ensuring the setting "sticks".

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
backport: add touch sensor support for Cintiq 24HD touch

Backported for 2.6.38 and 3.7.

Decode multitouch reports from the touch sensor of the Cintiq
24HD touch.

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