Input: wacom - support one finger touch the touchscreen way
authorPing Cheng <pinglinux@gmail.com>
Sun, 13 Mar 2011 04:34:42 +0000 (20:34 -0800)
committerDmitry Torokhov <dmitry.torokhov@gmail.com>
Sun, 13 Mar 2011 04:37:20 +0000 (20:37 -0800)
commita43c7c53835ba1ff4e488806d0f8b98e9dce9b0e
tree1a0d4d39432636d2dabe861e88c5cf0103d0f78a
parent8aa9a9ac89baa0e423da0211e0883d28165697e0
Input: wacom - support one finger touch the touchscreen way

There are two types of 1FGT devices supported in wacom_wac.c.
Changing them to follow the existing touchscreen format, i.e.,
only report BTN_TOUCH as a valid tool type.

Touch data will be ignored if pen is in proximity. This requires
a touch up event sent if touch was down when pen comes in. The
touch up event should be sent before any pen events are emitted.
Otherwise, two pointers would race for the cursor.

However, we can not send a touch up inside wacom_tpc_pen since
pen and touch are on different logical port. That is why we
have to check if touch is up before sending pen events.

Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
drivers/input/tablet/wacom_wac.c
drivers/input/tablet/wacom_wac.h