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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
This adds support for the two new multi-touch tablets.
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
Use switch instead of if statement to verify device types
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
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]>
Add support for the two new devices: DTU2231 and DTU1631.
Signed-off-by: Ping Cheng <[email protected]>
Signed-off-by: Dmitry Torokhov <[email protected]>
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]>