Commit Graph
94 Commits
Author SHA1 Message Date
Ping Cheng e0d41fd435 HID: wacom: rely on actual touch down count to decide touch_down
touch_down is a flag to indicate if there are touches on tablet
or not. Since one set of touch events may be posted over more
than one data packet/touch frame, and pen may come in proximity
while touch events are partially sent, counting all touch events
for the set reflects the actual status of touch_down.

Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2015-03-03 00:27:10 +01:00
Ping Cheng 486b908d44 HID: wacom: do not send pen events before touch is up/forced out
If pen comes in proximity while touch is down, we force touch up
before sending pen events. Otherwise, there can be unfinished
touch events compete with pen events. This idea has been fully
implemented for Tablet PCs. But other tablets that support both
pen and touch are not fully considered.

Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2015-03-03 00:27:09 +01:00
Ping Cheng a7e6645ee3 HID: wacom: Add missing ABS_MISC event and feature declaration for 27QHD
27QHD has the same x_min/y_min (WACOM_CINTIQ_OFFSET) as other Cintiqs.

ABS_MISC event is required for PAD packet to work properly with
xf86-input-wacom.

Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2015-02-12 11:47:37 +01:00
Ping Cheng 500d4160ab HID: wacom: add support for Cintiq 27QHD and 27QHD touch
These devices have accelerometers. To report accelerometer coordinates, a new
property, INPUT_PROP_ACCELEROMETER, is added.

Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2015-01-29 14:05:05 +01:00
Ping Cheng a2f71c6c87 HID: wacom: consolidate input capability settings for pen and touch
After PAD moved to its own interface, there were duplicated statements in
wacom_setup_pentouch_input_capabilities. Merge them together to reduce future
maintenance effort.

Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2015-01-29 14:05:04 +01:00
Ping Cheng 9b61aa864a HID: wacom: make sure touch arbitration is applied consistently
stylus_in_proximity is used to make sure no touch event is sent while pen is in
proximity. touch_down is used to make sure a touch up event is sent when pen
comes into proximity while touch is down.

Two touch routines didn't store touch_down. One touch routine forgot to check
stylus_in_proximity before sending touch events. This patch fixes those issues.

Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2015-01-29 14:05:04 +01:00
Ping Cheng b3bd7ef397 HID: wacom: peport In Range event according to the spec
Some Cintiq and Intuos tablets report In Range event. This event is sent before
valid data is reported when tool enters proximity; or before out of proximity
event is reported when tool exits.

While entering proximity, In Range means a pen is detected. This information
can be used for palm/touch rejection on both pen and touch enabled devices.
While exiting, it means the tool has reached its maximum detectable distance.

Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2015-01-12 10:16:32 +01:00
Ping Cheng 373a5356df HID: wacom: process invalid Cintiq and Intuos data in wacom_intuos_inout()
Users may use unsupported tools on Cintiq or Intuos. When invalid tools or data
are detected, they should be ignored. That is, no event from those tools should
be reported.

Consolidating that code in wacom_intuos_inout simplifies the logic and make it
easier for future code change.

Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2015-01-12 10:16:32 +01:00
Ping Cheng ecd618dc25 HID: wacom: Update maximum X/Y accounding to outbound offset
Defined outbound offset for DTU and Cintiq. But didn't update
the relevant maximum values. Oops...

Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2014-12-05 22:34:15 +01:00
Ping Cheng fff00bf8cc HID: wacom: Add support for DTU-1031X
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2014-12-05 22:34:15 +01:00
Ping Cheng fa77034028 HID: wacom: add defines for new Cintiq and DTU outbound tracking
There are screen to tablet offsets for newer Cintiq and DTU models.
These offsets serve as outbound tracking for those display tablets.

Use defines instead of hardcoded numbers for the offsets.

Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2014-12-02 11:41:15 +01:00
Ping Cheng 954df6ad00 HID: wacom: PAD is independent with pen/touch
PAD can be on pen interface (Intuos Pro and Cintiq series) or touch
interface (Bamboo PT and Intuos PT series) or its own interface
(Bamboo pen-only and Intuos Pen M/S). We need to mark it independently.

Signed-off-by: Ping Cheng <[email protected]>
Reviewed-by:  Benjamin Tissoires <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2014-11-26 10:41:44 +01:00
Ping Cheng 30ebc1aea8 HID: wacom - Bamboo pen-only tablet does not support PAD
Bamboo models do not support HID_DG_CONTACTMAX. Plus, Bamboo pen-only
has touch descriptor. This leads to some complications in the code.

This patch also fixes duplicated PAD interfeaces for Intuos Pen
models.

Signed-off-by: Ping Cheng <[email protected]>
Reviewed-by:  Benjamin Tissoires <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2014-11-20 17:28:43 +01:00
Ping Cheng 97edcad813 HID: wacom - Cleanup input_capabilities for Graphire 4 and Bamboo Fun
Graphire 4 only has two tablet buttons; Bamboo Fun touch ring is only
for PAD.

Signed-off-by: Ping Cheng <[email protected]>
Reviewed-by:  Benjamin Tissoires <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2014-11-20 17:28:42 +01:00
Ping Cheng b3c8e93f99 HID: wacom - return ENODEV for failed wacom_setup_pad_input_capabilities
ENODEV indicates no device is added. Hence, the associated pad input device
is simply freed.

Signed-off-by: Ping Cheng <[email protected]>
Reviewed-by:  Benjamin Tissoires <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2014-11-20 17:28:42 +01:00
Ping Cheng fefb391f8c HID: wacom: Add support for Intuos Pen Medium
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2014-11-11 23:49:53 +01:00
Ping Cheng 44b9683853 HID: wacom - make sure touch_input is valid before using it
touch_input is stored in wacom_shared for pen data to report touch
switch status. It is possible, although we didn't see it happen on
Linux yet, that pen data is procesed before touch interface is
fully probed.

As a by-product of this patch, it fixes the FreeBSD issue reported
by Denis Akiyakov http://www.spinics.net/lists/linux-input/msg33971.html

Reviewed-by: Hans Petter Selasky <[email protected]>
Tested-by: Denis Akiyakov <[email protected]>
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2014-11-07 16:40:47 +01:00
Ping Cheng 912ca216b5 HID: wacom - enable LED support for Wireless Intuos5/Pro
And associate all LED/OLED to PAD device

Signed-off-by: Ping Cheng <[email protected]>
Tested-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2014-09-11 10:24:14 +02:00
Ping Cheng c64d883476 HID: wacom - remove report_id from wacom_get_report interface
It is assigned in buf[0] anyway.

Signed-off-by: Ping Cheng <[email protected]>
Reviewed-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2014-09-11 10:24:13 +02:00
Ping Cheng 37449adc58 HID: wacom - Clean up of sysfs
changed to scnprintf(buf, PAGE_SIZE, ... ) as suggested in sysfs.txt
for show functions

Signed-off-by: Paul A. Tessier <[email protected]>
Signed-Off-by: Ping Cheng <[email protected]>
Tested-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2014-09-11 10:24:13 +02:00
Ping Cheng e0984bc376 HID: wacom - Add default permission defines for sysfs attributes
RW : ug=rw,o=r
WO : ug=w

And enabled reading relavent sysfs attributes.

Signed-off-by: Paul A. Tessier <[email protected]>
Signed-Off-by: Ping Cheng <[email protected]>
Tested-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2014-09-11 10:24:11 +02:00
Ping Cheng d7da3a3ccd Input: wacom - cleanup multitouch code when touch_max is 2
Historically we dealt with touch_max equals to 2 differently from
other MT devices. Now we use input_mt_*() to process all MT events,
as long as touch_max is greater than 1. So, there is no need to
take (touch_max == 2) as a special case any more.

Signed-off-by: Ping Cheng <[email protected]>
Reviewed-by: Jason Gerecke <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2014-06-15 00:28:38 -07:00
Ping Cheng 368c96640d HID: core: add two new usages for digitizer
On Feb 17, 2014, two new usages are approved to HID usage Table 18 -
Digitizer Page:

5A	Secondary Barrel Switch		MC	16.4
5B	Transducer Serial Number	SV	16.3.1

This patch adds relevant definitions to hid/input. It also removes
outdated comments in hid.h.

Signed-off-by: Ping Cheng <[email protected]>
Reviewed-by: Benjamin Tissoires <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
2014-06-03 13:27:24 +02:00
Ping Cheng ac414da37f Input: wacom - process outbound for newer Cintiqs
New Cintiq tablets have a 200 tablet counts outside of screen area.
Add x/y_min for ABS_X/Y to pass this information to userland.

Signed-off-by: Ping Cheng <[email protected]>
Reviewed-by: Jason Gerecke <[email protected]>
Tested-by: Jason Gerecke <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-29 00:09:16 -07:00
Ping Cheng 805a876af7 Input: wacom - set stylus_in_proximity when pen is in range
Signed-off-by: Ping Cheng <[email protected]>
Reviewed-by: Jason Gerecke <[email protected]>
Tested-by: Jason Gerecke <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-29 00:09:16 -07:00
Ping Cheng 91ae0e7783 Input: wacom - missed the last bit of expresskey for DTU-1031
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2014-04-19 13:56:07 -07:00
Ping Cheng 497ab1f290 Input: wacom - add support for DTU-1031
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2014-01-20 20:36:57 -08:00
Ping Cheng 713481620b Input: wacom - fix wacom->shared guards for dual input devices
features->quirks can have multiple bits set. For dual input, we only
need to check WACOM_QUIRK_MULTI_INPUT.

Reviewed-by: Jason Gerecke <[email protected]>
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2014-01-20 20:36:57 -08:00
Ping Cheng 961794a00e Input: wacom - add reporting of SW_MUTE_DEVICE events
New Intuos series models added a hardware switch to turn touch
data on/off. The state of the switch is reported periodically
from the tablet. To report the state the driver will emit SW_MUTE_DEVICE
events.

Reviewed_by: Chris Bagwell <[email protected]>
Acked-by: Peter Hutterer <[email protected]>
Tested-by: Jason Gerecke <[email protected]>
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2013-12-16 02:12:32 -08:00
Ping Cheng 3b5a7ab40c Input: add SW_MUTE_DEVICE switch definition
Some devices, such as new Intuos series tablets, have a hardware switch to
turn touch data on/off. To report the state, SW_MUTE_DEVICE is added
in include/uapi/linux/input.h.

Reviewed_by: Chris Bagwell <[email protected]>
Acked-by: Peter Hutterer <[email protected]>
Tested-by: Jason Gerecke <[email protected]>
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2013-12-05 12:49:37 -08:00
Ping Cheng b5fd2a3e92 Input: wacom - add support for three new Intuos devices
Two tablets in this series support both pen and touch. One (Intuos S)
only supports pen. This patch also updates the driver to process wireless
devices that do not support touch interface.

Tested-by: Jason Gerecke <[email protected]>
Reviewed-by: Chris Bagwell <[email protected]>
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2013-11-25 19:03:38 -08:00
Ping Cheng 1d0d6df027 Input: wacom - make sure touch_max is set for touch devices
Old single touch Tablet PCs do not have touch_max set at
wacom_features. Since touch device at lease supports one
finger, assign touch_max to 1 when touch usage is defined
in its HID Descriptor and touch_max is not pre-defined.

Tested-by: Jason Gerecke <[email protected]>
Signed-off-by: Ping Cheng <[email protected]>
Reviewed-by: Chris Bagwell <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2013-11-25 19:03:37 -08:00
Ping Cheng 57bcfce377 Input: wacom - not all multi-interface devices support touch
Some multi-interface devices support expresskeys on a separate interface,
such as Bamboo; some multi-interface devices do not support touch at all,
such as Pen only Intuos5. Make sure we report the right device names.

Tested-by: Jason Gerecke <[email protected]>
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2013-10-22 15:41:15 -07:00
Ping Cheng 9a35c411f9 Input: wacom - add support for three new Intuos Pro devices
Acked-by: Chris Bagwell <[email protected]>
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2013-09-20 09:59:01 -07:00
Ping Cheng c2b0c273e5 Input: wacom - LED is only supported through digitizer interface
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2013-09-20 09:58:58 -07:00
Ping Cheng 1b2faaf7e2 Input: wacom - testing result shows get_report is unnecessary.
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2013-09-20 09:58:56 -07:00
Ping Cheng f41a64eeab Input: wacom - add support for 0x300 and 0x301
Tested-by: Arjuna Rao Chavala <[email protected]>
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2013-08-24 17:44:46 -07:00
Ping Cheng 401d7d108f Input: wacom - integrate resolution calculation
Reviewed-by: Jason Gerecke <[email protected]>
Tested-by: Jason Gerecke <[email protected]>
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2013-08-12 22:31:12 -07:00
Ping Cheng 7d753b0d38 Input: wacom - add a new stylus (0x100802) for Intuos5 and Cintiqs
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2013-06-18 23:20:53 -07:00
Ping Cheng 3bd1f7e2db Input: wacom - fix a typo for Cintiq 22HDT
And make the lines easier to read.

Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2013-06-04 09:38:57 -07:00
Ping Cheng c73a1afbe6 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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2013-05-23 09:01:28 -07:00
Ping Cheng f0aaceac27 Input: wacom - 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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2013-05-05 20:13:21 -07:00
Ping Cheng 56218563ad Input: wacom - add three new display tablets
Cintiq 13HD, DTK 2241, and Cintiq 22HDT are supported.

Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2013-05-05 20:13:16 -07:00
Ping Cheng 5846115b30 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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2013-04-19 08:52:41 -07:00
Ping Cheng 1582eea208 Input: wacom - DTH2242 Grip Pen id was off by one bit
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2013-04-19 08:52:28 -07:00
Ping Cheng a112e9fdda Input: wacom - add support for DTH-2242
It is a pen with 10 finger touch device.

Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2013-02-13 20:21:22 -08:00
Ping Cheng 02295e68cf 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 <[email protected]>
Reviewed-by: Henrik Rydberg <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2013-01-06 01:11:02 -08:00
Ping Cheng 8c0e0a4fa8 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 updated
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 <[email protected]>
Reviewed-by: Henrik Rydberg <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2013-01-06 01:10:55 -08:00
Ping Cheng edbe265d24 Input: wacom - add support for a new MT device (0x4001)
It supports 10 fingers.

Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2012-11-21 13:22:10 -08:00
Ping Cheng 2ad5169c76 Input: wacom - simplify type check for newer V5 devices
The updated type enum enables this implementation.

Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2012-11-21 13:22:06 -08:00
Ping Cheng 6afdc289c9 Input: wacom - add support for 2 new multi-touch tablets (0x100 and 0x101)
This adds support for the two new multi-touch tablets.

Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2012-11-08 09:12:46 -08:00
Ping Cheng 3699dd7e16 Input: wacom - clean up device type code
Use switch instead of if statement to verify device types

Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2012-11-08 09:12:29 -08:00
Ping Cheng d838c644fe Input: wacom - add support to Cintiq 22HD
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2012-07-24 23:55:10 -07:00
Ping Cheng 1cecc5cc06 Input: wacom - don't retrieve touch_max when it is predefined
Some models, such as 0xE6, report more fingers than we process.

Reported-by: Jonathan Nieder <[email protected]>
Signed-off-by: Ping Cheng <[email protected]>
Tested-by: Nils Kanning <[email protected]>
Tested-by: Rafi Rubin <[email protected]>
Reviewed-by: Jason Gerecke <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2012-06-28 17:02:45 -07:00
Ping Cheng 61c91dd4a5 Input: wacom - fix retrieving touch_max bug
rep_data is not an array anymore, so taking it's address when passing to
wacom_get_report() is wrong.

Signed-off-by: Ping Cheng <[email protected]>
Tested-by: Rafi Rubin <[email protected]>
Reviewed-by: Jason Gerecke <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2012-06-28 17:02:40 -07:00
Ping Cheng 6795a524f0 Input: wacom - TPC2FG doesn't store touch id for slots
Signed-off-by: Ping Cheng <[email protected]>
Tested-by: Rafi Rubin <[email protected]>
Reviewed-by: Jason Gerecke <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2012-06-28 16:59:23 -07:00
Ping Cheng adad004e1a Input: wacom - BTN_TOOL_DOUBLETAP is not a valid device_type
It is replaced by BTN_TOOL_FINGER.

Signed-off-by: Ping Cheng <[email protected]>
Tested-by: Rafi Rubin <[email protected]>
Reviewed-by: Jason Gerecke <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2012-06-28 16:59:18 -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 <[email protected]>
Acked-by: Chris Bagwell <[email protected]>
Reviewed-by: Jason Gerecke <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Acked-by: Chris Bagwell <[email protected]>
Reviewed-by: Jason Gerecke <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2012-06-12 00:39: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 <[email protected]>
Signed-off-by: Chris Bagwell <[email protected]>
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Chris Bagwell <[email protected]>
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2012-04-29 21:13:46 -07:00
Ping Cheng 31175a8348 Input: wacom - use switch statement for wacom_tpc_irq()
And add two new data formats.

Tested-by: Chris Bagwell <[email protected]>
Reviewed-by: Chris Bagwell <[email protected]>
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Reviewed-by: Chris Bagwell <[email protected]>
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2012-01-31 00:14:13 -08:00
Ping Cheng 04c59abd3c Input: wacom - make LED status readable through sysfs
Reviewed-by: Eduard Hasenleithner <[email protected]>
Tested-by: Eduard Hasenleithner <[email protected]>
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2011-10-05 00:26:24 -07:00
Ping Cheng 09e7d94107 Input: wacom - add LED support for Cintiq 21ux2
Cintiq 21ux2 has two sets of four LEDs on right and left side of
the tablet, respectively.

Reviewed-by: Eduard Hasenleithner <[email protected]>
Tested-by: Eduard Hasenleithner <[email protected]>
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2011-10-05 00:26:21 -07:00
Ping Cheng 77e82516a6 Input: wacom - don't expose LED inactive option
The LED also indicates the status of the tablet. Don't turn it off.

Reviewed-by: Eduard Hasenleithner <[email protected]>
Tested-by: Eduard Hasenleithner <[email protected]>
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2011-10-05 00:26:17 -07:00
Ping Cheng f4fa9a6d80 Input: wacom - lower the LED luminance
The LED luminance level is normally lower when no button is pressed.

Reviewed-by: Eduard Hasenleithner <[email protected]>
Tested-by: Eduard Hasenleithner <[email protected]>
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2011-10-05 00:26:00 -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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2011-08-26 23:20:12 -07:00
Ping Cheng 3b48c91cdf Input: wacom - report id 3 returns 4 bytes of data
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2011-08-16 00:21:52 -07:00
Ping Cheng a417ea4432 Input: wacom - add WAC_MSG_RETRIES define
Use WAC_MSG_RETRIES define instead of a numeric constant.

Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2011-08-16 00:21:48 -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 <[email protected]>
Reviewed-by: Chris Bagwell <[email protected]>
Reviewed-by: Henrik Rydberg <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Reviewed-by: Chris Bagwell <[email protected]>
Reviewed-by: Henrik Rydberg <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Reviewed-by: Chris Bagwell <[email protected]>
Reviewed-by: Henrik Rydberg <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]> for 6A
Signed-off-by: David Foley <[email protected]>
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2011-06-27 13:07:45 -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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2011-06-22 01:25:59 -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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2011-03-26 22:30:59 -07:00
Ping Cheng 84eb5aa6cc Input: wacom - support 2FGT in MT format
Reviewed-by: Henrik Rydberg <[email protected]>
Reviewed-by: Chris Bagwell <[email protected]>
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Reviewed-by: Chris Bagwell <[email protected]>
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Reviewed-by: Chris Bagwell <[email protected]>
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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 <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2011-03-12 20:37:12 -08:00
Ping Cheng 28a1bc1c0a Input: wacom_w8001 - report resolution to userland
Serial devices send both pen and touch data through the same logical
port. Since we scaled touch to pen maximum, we use pen resolution
for touch as well here.

This is under the assumption that pen and touch share the same physical
surface. In the case when a small physical dimensional difference occurs
between pen and touch, we assume the tolerance for touch point precision
is higher than pen and the difference is within touch point tolerance.

A per-MT tool based resolution mechanism should be introduced if the
above assumption does not hold true for the pen and touch devices any
more.

Signed-off-by: Ping Cheng <[email protected]>
Reviewed-by: Henrik Rydberg <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2011-01-31 21:32:24 -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 <[email protected]>
Reviewed-by: Henrik Rydberg <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2011-01-25 18:04:05 -08:00
Ping Cheng d38acb49b7 Input: wacom - add 2 Bamboo Pen and touch models
Reported-by: David Foley <[email protected]>
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2011-01-24 09:33:41 -08:00
Ping Cheng 5fca6cac9f Input: wacom_w8001 - add single-touch support
Emulate single-touch compatible events for the 2-finger panels
so that they can be used with single-touch legacy clients.

Assign device ids as Wacom USB vendor ID and product ID.
Name the device to reflect its specific features.

Scale touch coordinates to pen maximum if pen supported.

Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2011-01-11 01:07:44 -08:00
Ping Cheng a6d38f8897 Input: wacom_w8001 - support pen or touch only devices
Not all penabled devices support touch. The same holds true for touch
devices, so we should be setting up devices according to the results
returned when we query the hardware.

Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2010-12-30 00:23:10 -08:00
Ping Cheng 202b6ca149 Input: wacom_w8001 - use __set_bit to set keybits
This makes code safer and easier to read.

Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2010-12-27 17:34:22 -08:00
Ping Cheng 4a88081e73 Input: wacom - parse the Bamboo device family
The Bamboo devices have multiple interfaces which need to be setup
separately. Use the HID parsing mechanism to achieve that.

Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Henrik Rydberg <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2010-09-05 12:58:03 -07:00
Ping Cheng c8f2edc56a Input: wacom - add support for DTU2231 and DTU1631
Add support for the two new devices: DTU2231 and DTU1631.

Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2010-06-28 01:12:26 -07:00
Ping Cheng 3a4b4aaa54 Input: wacom - add Cintiq 21UX2 and Intuos4 WL
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2010-06-04 00:43:17 -07:00
Ping Cheng 49b764aebd Input: wacom - add device type to device name string
Devices supporting both pen and touch features share the same product ID,
but presented as 2 separate input devices. By adding device type to device
name string we can help userspace applications and users differentiate
between them. 'Finger' is used for the touch since touch has been used as
a suffix by userland hotplugging services.

Signed-off-by: Jason Childs <[email protected]>
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
2010-02-20 01:22:44 -08:00
Ping 3018aa4b1a serial/8250_pnp: add a new Fujitsu Wacom Tablet PC device
This is a new two finger touch Fujitsu Wacom Tablet PC.

Signed-off-by: Ping Cheng <[email protected]>
Cc: Alan Cox <[email protected]>
Cc: Dmitry Torokhov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
2010-01-16 12:15:37 -08:00