Commit graph

86 commits

Author SHA1 Message Date
Ping Cheng
8b4a0c1fe3 Input: wacom - use BTN_TOOL_FINGER to indicate touch device type
Tested-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-01-31 00:14:13 -08:00
Jason Gerecke
803296b678 Input: wacom - add support for Cintiq 24HD
Adds support for the Cintiq 24HD. There are two quirks about this
model that haven't been seen in prior tablets. First, a second
touch ring is present on this display; it is being exposed via the
ABS_THROTTLE axis. Second, three capacitive buttons at the top of
the unit are available; though physically a touch strip, we report
the use of these buttons with generic KEY_ events.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-12-12 00:14:16 -08:00
Dmitry Torokhov
0d2cd91bf7 Merge commit 'v3.2-rc3' into next 2011-11-29 01:51:07 -08:00
Chris Bagwell
5a6c865d98 Input: wacom - ignore unwanted bamboo packets
Bamboo's Pen and Touch packets always start with a value
of 0x02 in first byte.  In 3rd gen Bamboo's, the hw is now
periodically sending some additional packets with unrelated data
and uses a value other than 0x02 to inform driver this.

Ignore those packets now.

This was reported by users as bad behavior in Gimp. The
invalid packets being processed made the stylus report
out of proximity for the 1 packet and this triggered some
secondary bug which caused Gimp to stop drawing until
user really took pen out of proximity of tablet.

Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-11-07 19:56:41 -08:00
Chris Bagwell
73149ab843 Input: wacom - 3rd gen Bamboo P&Touch packet support
3rd generation Bamboo Pen and Touch tablets reuse the older
stylus packet but add an extra fixed zero pad byte to end.

The touch packets are quite different since it supports tracking
of up to 16 touches. The packet is 64-byte fixed size but contains
up to 15 smaller messages indicating data for a single touch or
for tablet button presses.

Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-10-26 22:36:10 -07:00
Chris Bagwell
c5981411f6 Input: wacom - relax Bamboo stylus ID check
Bit 0x02 always means tip versus eraser. Bit 0x01 is something related
to version of stylus and different values are starting to be used.

Relaxing proximity check is required to be used with 3rd generation
Bamboo Pen and Touch tablets.

Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-10-26 22:36:03 -07:00
Dmitry Torokhov
6ad390a25a Merge branch 'next' into for-linus 2011-10-26 21:46:20 -07:00
Chris Bagwell
ae927560a7 Input: wacom - correct max Y value on medium bamboos
Medium size Bamboo P&T driver reused max X/Y form older Bamboo 1
medium size tablets and never updated to real value. Actual
active area of tablet is slightly larger in Y direction.

Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-10-10 08:55:37 -07:00
Chris Bagwell
c18c2cec31 Input: wacom - add ABS_DISTANCE to Bamboo Pen reports
Tablet reports a distance of 0 right at highest point possible
to be in proximity and distance_max when touching tablet. Inverse
the distance since user land has no way of knowing ABS_DISTANCE
is not distance from tablet.

Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-10-10 08:55:34 -07:00
Chris Bagwell
3d11ae8190 Input: wacom - remove unneeded touch pressure initialization
These were left in during removal of touch pressure reports but not
needed now.

Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-10-10 08:55:30 -07:00
Jason Gerecke
d6069dae47 Input: wacom - revert "Cintiq 21UX2 does not have menu strips"
This reverts commit 71c86ce597.
The 21UX2 does have touchstrips, but they are in a somewhat-
hidden location.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Acked-by: Ping Cheng <pinglinux@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-10-04 22:54:05 -07:00
Chris Bagwell
8f9068609e Input: wacom - fix touch parsing on newer Bamboos
Bamboos with Product ID's > 0xD4 return values unrelated to pressure
in touch 1 pressure field.  They also report 2nd touch X/Y values
shifted down 1 byte (where pressure was).  This results in jumpy
1 finger touch and totally invalid 2nd finger data.

For touch detection, switch to a Touch Present single bit that
all versions of Bamboo support.

For touch 2 offset, calculate offset based on a bit that is set
different between the two packet layouts.

Since touch pressure reports were removed from driver, there was
no need to be reading pressure any more.

Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Ping Cheng <pinglinux@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-09-12 22:08:59 -07:00
Jason Gerecke
3512069eef Input: wacom - add POINTER and DIRECT device properties
Adds INPUT_PROP_POINTER or INPUT_PROP_DIRECT as necessary to the
hardware supported by the Wacom driver. The DIRECT property is
assigned to devices with an embedded screen (i.e. touchscreens
and display tablets). The POINTER property is assigned to those
without embedded screens.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-09-08 09:42:28 -07:00
Jason Gerecke
1fab84aa63 Input: wacom - advertise BTN_TOOL_PEN and BTN_STYLUS for PenPartner
The Wacom PenPartner should advertise its stylus tip and button
in addition to the eraser tool. These are both physically
present on the hardware, and emitted from 'wacom_penpartner_irq'.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-26 23:20:21 -07:00
Ping Cheng
cfb7d55724 Input: wacom - remove pressure for touch devices
Touch devices do not report valid pressure or capacitance.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-26 23:20:12 -07:00
Gerard Braad
18adad1c57 Input: wacom - add support for the Wacom Bamboo Pen (CTL-660/K)
Signed-off-by: Gerard Braad <me@gbraad.nl>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-16 00:21:41 -07:00
Ping Cheng
8446001450 Input: wacom - cleanup a return value for the old Bamboo
The old code may call input_sync() without sending any other events.
While it will be suppressed by the input core not calling it at all
is still cheaper.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-06 21:24:35 -07:00
Ping Cheng
0bd10ef8f8 Input: wacom - update Graphire4 and old Bamboo tablet buttons
Bamboo touch sets BTN_BACK, BTN_FORWARD, BTN_LEFT, and BTN_RIGHT
as the default button events for tablet buttons. Change Graphire4
and old Bamboo to the same settings.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-06 21:24:25 -07:00
Ping Cheng
998c454e1c Input: wacom - add serial number for Graphire4 and old Bamboo
With the removal of BTN_TOOL_FINGER for tablet buttons and
expresskeys, serial number is needed to distingush if the
events were from a regular tool (stylus, eraser, or mouse)
or the attribures (buttons, strips, or wheels) on the tablet
since there are overlapped events between the tools and the
tablet attributes.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-06 21:24:15 -07:00
Ping Cheng
358ea22ee3 Input: wacom - remove BTN_TOOL_FINGER for pad
BTN_TOOL_FINGER was designed to indicate a single finger touch.
Remove the lines that borrowed this type for expresskeys and
tablet buttons.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-06 21:24:06 -07:00
Ping Cheng
11d0cf8859 Input: wacom - add 3 new models - 6A, 6B, and 97
Tested-by: Alex Tervoort <alex.tervoort@gmail.com> for 6A
Signed-off-by: David Foley <favux.is@gmail.com>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-27 13:07:55 -07:00
Ping Cheng
a001a8f3ce Input: wacom - Wacom Bamboo Pen D4 has 1024 pressure levels
D4 has 1024, not 512, pressure levels.

Reported-by: David Foley <favux.is@gmail.com>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-27 13:07:45 -07:00
Aristeu Rozanski
1483f5513b Input: wacom - use only one interface with DTU-2231
The Wacom DTU-2231 tablet has two interfaces on its default configuration
and both have HID class, leading to the creation of two input devices
instead of one. Only the first one is used, so filter out the second.

Signed-off-by: Aristeu Rozanski <aris@redhat.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-22 01:26:09 -07:00
Ping Cheng
71c86ce597 Input: wacom - Cintiq 21UX2 does not have menu strips
So don't set ABS_RX/ABS_RY for them.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-06-22 01:25:59 -07:00
Manoj Iyer
26fcd2a761 Input: wacom - add support for Lenovo tablet ID (0xE6)
Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-31 22:41:24 -07:00
Ping Cheng
e35fb8c1db Input: wacom - report resolution for pen devices
Touch resolution is reported to the userland by retrieving the value
from the HID descriptor. But pen resolution is not since it can not
be retrieved. The current Wacom X driver has a resolution table.
To centralize the source of these values, the resolution entries are
added in the wacom_features struct for x and y coordinates respectively.
The values are then reported to the userland.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-26 22:31:06 -07:00
Ping Cheng
7b824bbdd6 Input: wacom - constify wacom_features for a new missed Bamboo models
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-26 22:30:59 -07:00
Ping Cheng
84eb5aa6cc Input: wacom - support 2FGT in MT format
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>
2011-03-12 20:37:25 -08:00
Ping Cheng
a43c7c5383 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>
2011-03-12 20:37:20 -08:00
Ping Cheng
8aa9a9ac89 Input: wacom - process pen data in its own routine
So it would be easier for patch reviewers to follow the data path.

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>
2011-03-12 20:37:16 -08:00
Ping Cheng
4fc193814b Input: wacom - do not send 2FGT Tablet PC events in TAP format
2FGT Tablet PC touch events were processed in _TAP_ format. Remove
them so we can change to _MT_ format.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-03-12 20:37:12 -08:00
Ping Cheng
409550f290 Input: wacom - pass touch resolution to clients through input_absinfo
Also remove fake ABS_RX/ABS_RY "axes" that were used to report physical
dimensions now that we have better way.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Reviewed-by: Henrik Rydberg <rydberg@euromail.se>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-01-25 18:04:05 -08:00
Ping Cheng
d38acb49b7 Input: wacom - add 2 Bamboo Pen and touch models
Reported-by: David Foley <favux.is@gmail.com>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-01-24 09:33:41 -08:00
Dmitry Torokhov
554738da71 Merge branch 'next' into for-linus
Conflicts:
	include/linux/input.h
2011-01-06 22:34:59 -08:00
Ajay Ramaswamy
7b4b30689d Input: wacom - add support for digitizer in Lenovo W700
Signed-off-by: Ajay Ramaswamy <ajay@ramaswamy.net>
Reviewed-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-12-23 01:22:55 -08:00
Henrik Rydberg
c5f4dec1ce input: mt: Move tracking and pointer emulation to input-mt
The drivers using the type B protocol all report tracking information
the same way. The contact id is semantically equivalent to
ABS_MT_SLOT, and the handling of ABS_MT_TRACKING_ID only complicates
the driver. The situation can be improved upon by providing a common
pointer emulation code, thereby removing the need for the tracking id
in the driver.  This patch moves all tracking event handling over to
the input core, simplifying both the existing drivers and the ones
currently in preparation.

Acked-by: Ping Cheng <pingc@wacom.com>
Acked-by: Jiri Kosina <jkosina@suse.cz>
Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2010-12-16 10:41:38 +01:00
Henrik Rydberg
8cde810016 input: mt: Collect slots initialization code
The MT slots devices all follow the same initialization pattern
of creating slots and hinting about buffer size. Let drivers call
an initialization function instead, and make sure it can be called
repeatedly without side effects.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2010-12-16 10:41:12 +01:00
Henrik Rydberg
47c78e8913 input: mt: Break out slots handling
In preparation for common code to handle a larger set of MT slots
devices, move the slots handling over to a separate file.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
2010-12-16 10:39:57 +01:00
Kevin Granade
57a7872fa0 Input: wacom - add another Bamboo Pen ID (0xd4)
Add the features struct and device table entry to enable yet another
version of Wacom Bamboo Pen (CTL460, Product ID 0xD4).

Signed-off-by: Kevin Granade <kevin.granade@gmail.com>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-12-10 23:04:43 -08:00
David Foley
47d092352c Input: wacom - add new Bamboo PT (0xdb)
Adds new Bamboo Pen & Touch model - Bamboo P & T Special Edition
Medium (CTH661/L; Product ID = 0xdb).

Tested-by: Tobias Verbeke <tobias.verbeke@gmail.com>
Signed-off-by: David Foley <favux.is@gmail.com>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-12-07 21:09:38 -08:00
David Foley
a318e6b1a0 Input: wacom - add IDs for two new Bamboo PTs
Add two new Bamboo Pen & Touch models:

Bamboo Comic Medium			(CTH661/S1; Product ID = 0xd8)
Bamboo P & T Special Edition Small	(CTH461/L;  Product ID = 0xdA)

Tested-by: IRIE Shinsuke <irieshinsuke@yahoo.co.jp>
Tested-by: Andrea Cadeddu <mrernia@gmail.com>
Signed-off-by: David Foley <favux.is@gmail.com>
Reviewed-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-11-30 23:59:35 -08:00
Ping Cheng
6521d0bf98 Input: wacom - specify Cinitq supported tools
Cintiq, being a display tablet, doesn't have mouse and associated BTN_s.
Make sure we do not specify them when registering Cintiq's input device
so that userland can retrieve the exact tool set the device supports.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-10-24 21:56:32 -07:00
Dmitry Torokhov
3136baf8d0 Merge branch 'for-linus' into next 2010-10-17 21:20:19 -07:00
Aristeu Rozanski
ca047fedd8 Input: wacom - fix pressure in Cintiq 21UX2
Currently the pressure range in Cintiq 21UX2 is limited to half of the
supported. This patch fixes the problem.

Signed-off-by: Aristeu Rozanski <aris@redhat.com>
Acked-by: Ping Cheng <pingc@wacom.com>
CC: stable@kernel.org
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-10-10 14:16:09 -07:00
Chris Bagwell
33d5f713a1 Input: wacom - disable Bamboo touchpad when pen is being used
Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-09-12 00:13:38 -07:00
Chris Bagwell
2aaacb1536 Input: wacom - add support for Bamboo Pen
This adds support for Pen on Bamboo Pen and Bamboo Pen&Touch devices.
Touchpad is handled by previous Bamboo Touch logic.

Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-09-12 00:13:32 -07:00
Chris Bagwell
e1d38e49ad Input: wacom - move Bamboo Touch irq to its own function
This is in preparation of pen support in same irq handler.

Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-09-12 00:13:27 -07:00
Henrik Rydberg
f4ccbef288 Input: wacom - add a quirk for low resolution Bamboo devices
The Bamboo Touch reports a sub-screen resolution of 480x320.  The
signal-to-noise ratio is only about 100, so filtering is needed in
order to reduce the jitter to a usable level. However, the low
resolution leads to round-off errors in the EWMA filter, resulting in
extremely jerky pointer motion. This patch explicitly sets a higher
resolution for those devices, and tells this to the completion handler
via a low-resolution quirk.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-09-05 12:58:22 -07:00
Henrik Rydberg
cb734c0368 Input: wacom - add support for the Bamboo Touch trackpad
Add support for the Bamboo Touch trackpad, and make it work with
both the Synaptics X Driver and the Multitouch X Driver. The device
uses MT slots internally, so the choice of protocol is a given.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-09-05 12:58:17 -07:00
Henrik Rydberg
bc73dd39e7 Input: wacom - collect device quirks into single function
Collect device-specific code into a single function, and use quirks to
flag specific behavior instead.

Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2010-09-05 12:58:12 -07:00