Backport: Input: wacom - fix touch support for Bamboo Fun CTH-461

Commit f393ee2b814e3291c12565000210b3cf10aa5c1d forgot to add the
touch_max property for Wacom Bamboo Fun CTH-461/S, ID 056a:00d2.

This broke the touch functionality for that device. This patch,
(done with help of Ping Cheng), adds the correct value and makes
touch work again.

Signed-off-by: Diego Calleja <diegocg@gmail.com>
Reviewed-by: Ping Cheng <pinglinux@gmail.com>
Cc: stable@kernel.org
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
input-wacom 0.16.0

Signed-off-by: Ping Cheng <pingc@wacom.com>
input: wacom - Prepare for syncing with input-mt changes

Henrik added new MT routines in release 3.7. This patch is to
prepare for the use of new MT routines.

In the newly added wacom_abs_set_axis() function, the first
if-statement assigns ABS_X/Y for number of contacts less or
equal to 2. So, it is single and 2 finger touch devices. Two
finger touch devices are processed here since they will not
use the updtaed input_mt_init_slots(), which does not offer
benefit to those devices.

input_mt_init_slots() will take care of ABS_X/Y assignment when
flags are not zero. All touch devices with more than two contacts
will use input_mt_init_slots() with non-zero flags.

The second if-statement is for all MT devices, which include two
finger touch devices.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
input: wacom - use new input-mt routines

This patch brings wacom driver in-sync with input-mt changes
made in release 3.7.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Input: wacom - fix wacom_set_report retry logic

Logic sets a value and then reads it back to make sure it worked
and retries write on failures.  Since read and write share a buffer,
it needs to be set back up before writing though.

Issue is not seen a lot because 1) it doesn't need to retry for
a lot of tablets and 2) a lot of failures that need a retry are
from an -ETIMEDOUT and hopefully buffer is not touched in this case.

At least one user has shown logs with buffer being modified during
-ETIMEDOUT case with linux 3.7 kernel.

Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Input: wacom - add support for DTH-2242

It is a pen with 10 finger touch device.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Backport: Input: wacom - add support for DTH-2242

It is a pen with 10 finger touch device.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Backport: Input : wacom - add support for 0x10d

It is a Wacom device found in Fujitsu Lifebook T902.

Signed-off-by: Stephan Frank <sfrank@cs.tu-berlin.de>
Signed-off-by: Ping Cheng <pingc@wacom.com>
input: wacom: Fix "can not retrieve extra class descriptor" for 24HDT

The MFT device in the Cintiq 24HDT has two interfaces sharing the
same configuration. Without this patch, the driver attempts to
make use of both interfaces, even though the second interface is
not compatible with this driver.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Tested-by: Ping Cheng <pingc@wacom.com>
DTH2242 Grip Pen isn't an eraser

Looks like this was accentally added in the wrong spot.
Input: wacom: Correct reported resolution for Intuos4 Wireless

Reported-by: Przemo Firszt <przemo@firszt.eu>
Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Input: wacom - DTH2242 Grip Pen id was one bit off

Signed-off-by: Ping Cheng <pingc@wacom.com>
input: wacom: Fix "can not retrieve extra class descriptor" for DTH2242

Same as Cintiq 24HDT, DTH2242 has two interfaces sharing one configuration.
This patch ignores the second interface.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Backport: add three new display tablets

Cintiq 13HD, DTK 2241, and Cintiq 22HDT are supported.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Backport: add a few new styli for Cintiq series

Add new styli for Cintiq 13HD and 22HD. Update comments for
for tools. Check whole 10 nibbles of tool ID for tool
types. Remove unuecessary tool type for Intuos series PAD.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Backport: fix a typo for Cintiq 22HDT

And make the lines easier to read.

Signed-off-by: Ping Cheng <pingc@wacom.com>
input : wacom - add an eraser to DTH2242/DTK2241

plus send begin and end of express keys events for
Cintiq 13HD and DTH2242/DTK2241

Signed-off-by: Ping Cheng <pingc@wacom.com>
input-wacom 0.17.0

Signed-off-by: Ping Cheng <pingc@wacom.com>
Update wacom_tpc_mt to simulate two finger touch events

Signed-off-by: Ping Cheng <pingc@wacom.com>
Add a new stylus (0x100802) for Intuos5 and Cintiqs

Signed-off-by: Ping Cheng <pingc@wacom.com>