summaryrefslogtreecommitdiffstats
path: root/drivers/input/tablet/wacom_wac.c
AgeCommit message (Collapse)AuthorFilesLines
2014-07-25Input: wacom - move the USB (now hid) Wacom driver in drivers/hidBenjamin Tissoires1-2548/+0
wacom.ko is now a full HID driver, we have to move it into the proper subdirectory: drivers/hid. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-25Input: wacom - keep wacom_ids orderedBenjamin Tissoires1-40/+39
No Functional changes, just some reordering. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-25Input: wacom - remove field pktlen declaration in the list of devicesBenjamin Tissoires1-268/+246
pktlen is now overwritten by the driver directly by reading the hid report descriptor. There is no need to declare it statically. We also move down the position of the field in the struct so that we can keep the current declaration of Wacom devices. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-25Input: wacom - switch from an USB driver to a HID driverBenjamin Tissoires1-40/+40
All USB Wacom tablets are actually HID devices. For historical reasons, they are handled as plain USB devices. The current code makes more and more reference to the HID subsystem like implementing its own HID report descriptor parser to handle new devices. From the user point of view, we can transparently switch from this state to a driver handled in the HID subsystem and clean up a lot of USB specific code in the wacom.ko driver. The other benefit once the USB dependecies have been removed is that we can use a tool like uhid to make regression tests and allow further cleanup or new implementations without risking breaking current behaviors. To match the current handling of devices in wacom_wac.c, we rely on the hid_type set by usbhid. usbhid sets the hid_type to HID_TYPE_USBMOUSE when it sees a USB boot mouse protocol declared and HID_TYPE_USBNONE when the device is plain HID. There is thus a one to one matching between the list of supported devices before and after the switch from USB to HID. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-25Input: wacom - split out the pad device for Graphire G4 and MOBenjamin Tissoires1-17/+27
MSC_SERIAL can be safely removed from pad devices. If it is not here, xf86-input-wacom correctly generates ones for its internal use. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-25Input: wacom - split out the pad device for DTUSBenjamin Tissoires1-12/+6
MSC_SERIAL can be safely removed from the pad device. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-25Input: wacom - split out the pad device for BamboosBenjamin Tissoires1-16/+23
We rely on the return code of wacom_bpt*() to do the input_sync(). wacom_wac_irq() then properly sync the input devices. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-25Input: wacom - split out the pad device for Intuos/CintiqBenjamin Tissoires1-86/+122
MSC_SERIAL can be safely dropped for pad input devices. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-07-25Input: wacom - create a separate input device for padsBenjamin Tissoires1-1/+26
Currently, the pad events are sent through the stylus input device for the Intuos/Cintiqs, and through the touch input device for the Bamboos. To differentiate the buttons pressed on the pad from the ones pressed on the stylus, the Intuos/Cintiq uses MISC_SERIAL and ABS_MISC. This lead to a multiplexing of the events into one device, which are then splitted out in xf86-input-wacom. Bamboos are not using MISC events because the pad is attached to the touch interface, and only BTN_TOUCH is used for the finger (and DOUBLE_TAP, etc...). However, the user space driver still splits out the pad from the touch interface in the same way it does for the pro line devices. The other problem we can see with this fact is that some of the Intuos and Cintiq have a wheel, and the effective range of the reported values is [0..71]. Unfortunately, the airbrush stylus also sends wheel events (there is a small wheel on it), but in the range [0..1023]. From the user space point of view it is kind of difficult to understand that because the wheel on the pad are quite common, while the airbrush tool is not. A solution to fix all of these problems is to split out the pad device from the stylus/touch. This decision makes more sense because the pad is not linked to the absolute position of the finger or pen, and usually, the events from the pad are filtered out by the compositor, which then convert them into actions or keyboard shortcuts. For backward compatibility with current xf86-input-wacom, the pad devices still present the ABS_X, ABS_Y and ABS_MISC events, but they can be completely ignored in the new implementation. Signed-off-by: Benjamin Tissoires <benjamin.tissoires@redhat.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-05-29Input: wacom - process outbound for newer CintiqsPing Cheng1-22/+22
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 <pingc@wacom.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-05-29Input: wacom - set stylus_in_proximity when pen is in rangePing Cheng1-0/+2
Signed-off-by: Ping Cheng <pingc@wacom.com> Reviewed-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-05-14Input: wacom - add support for three new ISDv4 sensorsJason Gerecke1-1/+19
This patch adds support for the 0x4004, 0x5000, and 0x5002 sensors found on what should be the Motion R12, Fujitsu Q704, and Fujitsu T904. These tablets use a new report ID (3) for their touch packets and a slightly different HID descriptor format, but are otherwise largely identical in protocol to the "MTTPC" tablets. Note: * The R12 uses its 0x4004 sensor for touch input only. A pen interface is not present in its HID descriptor, though its possible a 0x4004 may be used for pen input by other tablet PCs in the future. * The 0x5002 sensor appears to use a new report ID (8) for its pen packets. The other sensors continue to use the traditional report ID (2). Signed-off-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-05-14Input: wacom - use unaligned access where necessaryJason Gerecke1-9/+9
A few cases of incorrectly using 'le16_to_cpup' instead of 'get_unaligned_le16' have been noticed and fixed. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-05-14Merge tag 'v3.15-rc5' into nextDmitry Torokhov1-19/+10
Merge with Linux 3.15-rc5 to sync up Wacom and other changes.
2014-05-14Input: wacom - add support for 0x116 sensor on Win8 Panasonic CF-H2Jason Gerecke1-0/+8
The Win8 version of the Panasonic CF-H2 includes a new Wacom device. The pen interface appears to use the same protocol as before, but the touch interface has been tweaked to send Win8-compatible reports. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-04-19Input: wacom - handle 1024 pressure levels in wacom_tpc_penJason Gerecke1-1/+1
Some tablet PC sensors (e.g. the 0xEC found in the Thinkpad Yoga) report more than 256 pressure levels and will experience wraparound unless the full range is read. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Aaron Skomra <Aaron.Skomra@wacom.com> Reviewed-by: Carl Worth <cworth@cworth.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-04-19Input: wacom - references to 'wacom->data' should use 'unsigned char*'Jason Gerecke1-18/+9
'wacom->data' contains raw binary data and can lead to unexpected behavior if a byte under examination happens to have its MSB set. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Aaron Skomra <Aaron.Skomra@wacom.com> Reviewed-by: Carl Worth <cworth@cworth.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-04-19Input: wacom - missed the last bit of expresskey for DTU-1031Ping Cheng1-1/+1
Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-20Input: wacom - add support for DTU-1031Ping Cheng1-1/+71
Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2014-01-20Input: wacom - fix wacom->shared guards for dual input devicesPing Cheng1-2/+2
features->quirks can have multiple bits set. For dual input, we only need to check WACOM_QUIRK_MULTI_INPUT. Reviewed-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-12-16Input: wacom - add reporting of SW_MUTE_DEVICE eventsPing Cheng1-3/+27
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 <chris@cnpbagwell.com> Acked-by: Peter Hutterer <peter.hutterer@who-t.net> Tested-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-12-16Merge tag 'v3.13-rc4' into nextDmitry Torokhov1-0/+8
Synchronize with mainline to bring in the new keycode definitions and new hwmon API.
2013-11-25Input: wacom - add support for three new Intuos devicesPing Cheng1-15/+46
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 <killertofu@gmail.com> Reviewed-by: Chris Bagwell <chris@cnpbagwell.com> Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-11-25Input: wacom - scale up touch width and height values for Intuos ProJason Gerecke1-2/+2
The width and height values reported by the Intuos Pro are not in surface units as required by the MT protocol. A simple multiplier of 100x corrects it. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-11-14Merge branch 'next' into for-linusDmitry Torokhov1-15/+99
Merge first round of changes for 3.13 merge window.
2013-10-22Input: wacom - add support for ISDv4 0x10E sensorJason Gerecke1-0/+4
Used in the Fujitsu T732 Signed-off-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-10-22Input: wacom - add support for ISDv4 0x10F sensorJason Gerecke1-0/+4
Signed-off-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Filip Zarnecki <Filip.Zarnecki@fuw.edu.pl> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-09-20Input: wacom - add support for three new Intuos Pro devicesPing Cheng1-14/+47
Acked-by: Chris Bagwell <chris@cnpbagwell.com> Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-09-20Input: wacom - send proper tablet state info when pen leaves proximityJason Gerecke1-0/+7
The EMR sensor of Intuos4 and newer devices can send a packet with 0x20 in its second byte which contains only location information. This packet is sent when the pen is too far away to reliably obtain other information. Because only the location is updated userspace will continue to see stale information for other values, most notably TOUCH, PRESSURE, and DISTANCE. This patch ensures userspace is not left with stale device state information when the pen re-enters proximity (possibly leading to the assumption the pen is still in contact even though it is actually hovering). Signed-off-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-09-20Input: wacom - support EMR and MFT sensors of Cintiq Companion HybridJason Gerecke1-1/+45
Adds support for the sensors integrated in to the Cintiq Companion Hybrid. These sensors use by-and-large the same protocol as the Cintiq 24HD touch. NOTE: The ExpressKeys on the Cintiq Companion Hybrid are wired to both the EMR controller and CPU GPIO pins. It may be necessary to disable their functionality in this driver if building a custom Android kernel for this device (lest two events be sent to userspace for every button press). Signed-off-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-09-18Merge tag 'v3.11' into nextDmitry Torokhov1-1/+11
Merge with mainline to bring in sync changes to cyttsp4 driver.
2013-09-06Merge branch 'next' into for-linusDmitry Torokhov1-15/+4
Merge first round of changes for 3.12 merge window.
2013-08-24Input: wacom - add support for 0x300 and 0x301Ping Cheng1-1/+9
Tested-by: Arjuna Rao Chavala <arjunaraoc@gmail.com> Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-08-12Input: wacom - integrate resolution calculationPing Cheng1-15/+4
Reviewed-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-06-18Input: wacom - add a new stylus (0x100802) for Intuos5 and CintiqsPing Cheng1-0/+2
Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-06-04Input: wacom - fix a typo for Cintiq 22HDTPing Cheng1-3/+5
And make the lines easier to read. Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-05-23Input: wacom - add an eraser to DTH2242/DTK2241Ping Cheng1-4/+15
plus send begin and end of express keys events for Cintiq 13HD and DTH2242/DTK2241 Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-05-05Input: wacom - add a few new styli for Cintiq seriesPing Cheng1-19/+17
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 <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-05-05Input: wacom - add three new display tabletsPing Cheng1-0/+36
Cintiq 13HD, DTK 2241, and Cintiq 22HDT are supported. Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-04-19Input: wacom - fix "can not retrieve extra class descriptor" for DTH2242Ping Cheng1-1/+1
Same as Cintiq 24HDT, DTH2242 has two interfaces sharing one configuration. This patch ignores the second interface. Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-04-19Input: wacom - DTH2242 Grip Pen id was off by one bitPing Cheng1-1/+1
Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-04-15Input: wacom - correct reported resolution for Intuos4 WirelessJason Gerecke1-1/+1
Reported-by: Przemo Firszt <przemo@firszt.eu> Signed-off-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Przemo Firszt <przemo@firszt.eu> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-04-07Input: wacom - fix "can not retrieve extra class descriptor" for 24HDTJason Gerecke1-1/+1
The MFT device in the Cintiq 24HDT has two interfaces sharing the same configuration. Without this patch, the driver attempts to make use of both interfaces, even though the second interface is not compatible with this driver. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Tested-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-03-09Input: wacom - add support for 0x10dStephan Frank1-0/+4
It is a Wacom device found in Fujitsu Lifebook T902. Signed-off-by: Stephan Frank <sfrank@cs.tu-berlin.de> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-02-19Merge branch 'next' into for-linusDmitry Torokhov1-101/+91
Prepare first set of updates for 3.9 merge window.
2013-02-13Input: wacom - add support for DTH-2242Ping Cheng1-1/+24
It is a pen with 10 finger touch device. Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-01-06Input: wacom - use new input-mt routinesPing Cheng1-60/+22
This patch brings wacom driver in-sync with input-mt changes made in release 3.7. Signed-off-by: Ping Cheng <pingc@wacom.com> Reviewed-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2013-01-06Input: wacom - prepare for syncing with input-mt changesPing Cheng1-40/+45
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 <pingc@wacom.com> Reviewed-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2012-12-16Merge branch 'next' into for-linusDmitry Torokhov1-6/+23
Prepare first set of updates for 3.8 merge window.
2012-12-03Input: wacom - fix touch support for Bamboo Fun CTH-461Diego Calleja1-1/+2
Commit f393ee2b814e3291c12565000210b3cf10aa5c1d forgot to add the touch_max property for Wacom Bamboo Fun CTH-461/S, ID 056a:00d2. This broke the touch functionality for that device. This patch, (done with help of Ping Cheng), adds the correct value and makes touch work again. Signed-off-by: Diego Calleja <diegocg@gmail.com> Reviewed-by: Ping Cheng <pinglinux@gmail.com> Cc: stable@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>