Commit graph

106 commits

Author SHA1 Message Date
Chris Bagwell
6dc463511d Input: wacom - Bamboo One 1024 pressure fix
Bamboo One's with ID of 0x6a and 0x6b were added with correct
indication of 1024 pressure levels but the Graphire packet routine
was only looking at 9 bits.  Increased to 10 bits.

This bug caused these devices to roll over to zero pressure at half
way mark.

The other devices using this routine only support 256 or 512 range
and look to fix unused bits at zero.

Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Reported-by: Tushant Mirchandani <tushantin@gmail.com>
Reviewed-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-06-12 00:40:16 -07:00
Ping Cheng
ac173837cd Input: wacom - add two new devices (0xed and 0xef)
0xed supports pen and one finger touch; 0xef is pen only.

Signed-off-by: Ping Cheng <pingc@wacom.com>
Acked-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-06-12 00:39:57 -07:00
Ping Cheng
ea2e602445 Input: wacom - rearrange type enum
So we can simplify a few type related if statements

Signed-off-by: Ping Cheng <pingc@wacom.com>
Acked-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-06-12 00:39:51 -07:00
Dmitry Torokhov
eb71d1bb27 Input: wacom - use dev_xxx() instead of naked printk()s and dbg()s
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-05-02 00:20:51 -07:00
Ping Cheng
1963518b9b Input: wacom - add 0xE5 (MT device) support
Main part of patch is adding support for a new Wacom MT touch
packet and labels these devices using MTSCREEN type.

Other items of interest:

Delete some duplicate code in HID parsing for Y info since
its already done in X path.

In wacom_query_tablet_data(), only invoke the set report
that requests tablets to send Wacom Touch packets for
Finger interfaces.  Mostly, this is to make code intent clear.

Tested-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-29 21:13:53 -07:00
Ping Cheng
f393ee2b81 Input: wacom - retrieve maximum number of touch points
From the HID usage table when it is supported.

Tested-by: Jason Gerecke <killertofu@gmail.com>
Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Signed-off-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-29 21:13:46 -07:00
Dmitry Torokhov
57b8628bb0 Merge commit 'v3.4-rc4' into next 2012-04-21 23:28:35 -07:00
Jason Gerecke
ae584ca473 Input: wacom - add Intuos5 multitouch sensor support
Intuos5 tablets with PTH-* model numbers include a multitouch sensor
which use the same touch reports as the 3rd-generation Bamboo. No
useful information is in the HID descriptor for the touch interface
so hardcoded values are used during setup.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-04 09:25:42 -07:00
Jason Gerecke
f860e581fd Input: wacom - add Intuos5 Touch Ring/ExpressKey support
Intuos5 uses a new report type for Touch Ring and ExpressKey data.
Note that data from the capacitive sensors present on the ExpressKeys
will be ignored until a proper way is found to expose it.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-04 09:25:41 -07:00
Jason Gerecke
9fee619505 Input: wacom - add basic Intuos5 support
This patch adds support for the basic pen functions of Intuos5
tablets.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Reviewed-by: Chris Bagwell <chris@cnpbagwell.com>
Reviewed-by: Ping Cheng <pingc@wacom.com>
Tested-by: Timo Aaltonen <tjaalton@ubuntu.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-04-04 09:25:41 -07:00
Dmitry Torokhov
993808253c Merge branch 'next' into for-linus
Conflicts:
	drivers/input/tablet/wacom_sys.c
2012-03-27 00:27:10 -07:00
Chris Bagwell
a1d552cc15 Input: wacom - wireless battery status
Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Tested-by: Jason Gerecke <killertofu@gmail.com>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-03-25 23:33:17 -07:00
Chris Bagwell
16bf288c4b Input: wacom - create inputs when wireless connect
When a tablet connect or disconnect is detected, schedule
work queue to register or unregister related input devices.

When a wireless tablet connects, it reports same USB PID
used if tablet is connected with USB cable. Use this to
update features values, set input capabilities, and then
register device.  From there, the Pen and Touch interfaces
will reuse the existing tablet's IRQ routines.

Its possible that 1 receiver is shared with 2 tablets with
different PID (small and medium Bamboo for example) so the
input is unregister at disconnect to better support this case.

Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Tested-by: Jason Gerecke <killertofu@gmail.com>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-03-25 23:32:59 -07:00
Chris Bagwell
d3825d51c3 Input: wacom - wireless monitor framework
The 3rd gen Bamboo Pen & Touch and Intuos5 tablets support an
optional wireless module. When its receiver is plugged into USB,
it presents 3 interfaces: 0) Monitor 1) Pen and 2) Touch.

The exact capabilities of the Pen and Touch interfaces can
not be determined until a tablet connection is established
and reported over the Monitor interface.

This patch detects this wireless receiver and enables interrupt
packets to be processed for the Monitor interface. Processing
the data in packets will be left to another patch.

Since it doesn't make sense to create an input device for the
Monitor interface, it is not created. Creation of Pen and Touch
input device is also delayed until monitor packets can be processed.

Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Tested-by: Jason Gerecke <killertofu@gmail.com>
Acked-by: Ping Cheng <pingc@wacom.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-03-25 23:31:32 -07:00
Dmitry Torokhov
10ce3cc919 Merge branch 'next' into for-linus 2012-03-19 17:02:01 -07:00
Dmitry Torokhov
b675b3667f Merge commit 'v3.3-rc6' into next 2012-03-09 10:55:17 -08:00
Jason Gerecke
19d57d3a14 Input: wacom - fix 3rd-gen Bamboo MT when 4+ fingers are in use
The message count field uses three bits of storage, not two.

Signed-off-by: Jason Gerecke <killertofu@gmail.com>
Acked-by: Chris Bagwell <chris@cnpbagwell.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-03-07 00:45:26 -08:00
Ping Cheng
31175a8348 Input: wacom - use switch statement for wacom_tpc_irq()
And add two new data formats.

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:17 -08:00
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
Dmitry Torokhov
da733563be Merge branch 'next' into for-linus 2012-01-08 23:38:23 -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
Chris Bagwell
0d0e3064a8 Input: wacom - add product id used by Samsung Slate 7
New product ID reported by Harvey Braun on linuxwacom mailing list
and also tested this patch with new hardware.

Signed-off-by: Chris Bagwell <chris@cnpbagwell.com>
Acked-by: Ping Cheng <pinglinux@gmail.com>
Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-12-12 00:00:55 -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