summaryrefslogtreecommitdiffstats
path: root/drivers/input/tablet
Commit message (Collapse)AuthorAgeFilesLines
* Input: wacom - process outbound for newer CintiqsPing Cheng2014-05-292-22/+24
| | | | | | | | | | 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>
* Input: wacom - set stylus_in_proximity when pen is in rangePing Cheng2014-05-291-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>
* Input: wacom - add support for three new ISDv4 sensorsJason Gerecke2014-05-153-1/+41
| | | | | | | | | | | | | | | | | | | | | 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>
* Input: wacom - use unaligned access where necessaryJason Gerecke2014-05-151-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>
* Merge tag 'v3.15-rc5' into nextDmitry Torokhov2014-05-152-147/+128Star
|\ | | | | | | Merge with Linux 3.15-rc5 to sync up Wacom and other changes.
| * Input: wacom - handle 1024 pressure levels in wacom_tpc_penJason Gerecke2014-04-191-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>
| * Input: wacom - references to 'wacom->data' should use 'unsigned char*'Jason Gerecke2014-04-191-18/+9Star
| | | | | | | | | | | | | | | | | | | | '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>
| * Input: wacom - override 'pressure_max' with value from HID_USAGE_PRESSUREJason Gerecke2014-04-191-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | The 0xEC sensor is used in multiple tablet PCs and curiously has versions that report 256 levels of pressure (Samsung Slate 7) as well as versions that report 1024 levels (Lenovo Thinkpad Yoga). To allow both versions to work properly, we allow the value of HID_USAGE_PRESSURE reported to override pressure_max. 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>
| * Input: wacom - use full 32-bit HID Usage value in switch statementJason Gerecke2014-04-191-128/+109Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | A HID Usage is a 32-bit value: an upper 16-bit "page" and a lower 16-bit ID. While the two halves are normally reported seperately, only the combination uniquely idenfifes a particular HID Usage. The existing code performs the comparison in two steps, first performing a switch on the ID and then verifying the page within each case. While this works fine, it is very akward to handle two Usages that share a single ID, such as HID_USAGE_PRESSURE and HID_USAGE_X because the case statement can only have a single identifier. To work around this, we now check the full 32-bit HID Usage directly rather than first checking the ID and then the page. This allows the switch statement to have distinct cases for e.g. HID_USAGE_PRESSURE and HID_USAGE_X. 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>
| * Input: wacom - missed the last bit of expresskey for DTU-1031Ping Cheng2014-04-191-1/+1
| | | | | | | | | | Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | Input: wacom - add support for 0x116 sensor on Win8 Panasonic CF-H2Jason Gerecke2014-05-152-0/+9
|/ | | | | | | | | | 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>
* Input: gtco - fix usb_dev leakAlexey Khoroshilov2014-01-281-1/+1
| | | | | | | | | | | | | | | | There is usb_get_dev() in gtco_probe(), but there is no usb_put_dev() anywhere in the driver. As pointed out by Dmitry Torokhov: The lifetime of gtco structure is already directly tied to lifetime of usb_dev: when destroying usb_dev driver core will call remove() function of currently bound driver (in our case gtco) which will destroy gtco memory. Taking additional reference is not needed here. Found by Linux Driver Verification project (linuxtesting.org). Signed-off-by: Alexey Khoroshilov <khoroshilov@ispras.ru> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: wacom - add support for DTU-1031Ping Cheng2014-01-212-2/+76
| | | | | Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: wacom - fix wacom->shared guards for dual input devicesPing Cheng2014-01-211-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>
* Input: delete non-required instances of include <linux/init.h>Paul Gortmaker2014-01-076-6/+0Star
| | | | | | | | | | None of these files are actually using any __init type directives and hence don't need to include <linux/init.h>. Most are just a left over from __devinit and __cpuinit removal, or simply due to code getting copied from one driver to the next. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: wacom - add reporting of SW_MUTE_DEVICE eventsPing Cheng2013-12-163-3/+44
| | | | | | | | | | | | | 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>
* Merge tag 'v3.13-rc4' into nextDmitry Torokhov2013-12-162-0/+12
|\ | | | | | | | | Synchronize with mainline to bring in the new keycode definitions and new hwmon API.
| * Merge branch 'next' into for-linusDmitry Torokhov2013-11-153-53/+165
| |\ | | | | | | | | | Merge first round of changes for 3.13 merge window.
| * | Input: wacom - add support for ISDv4 0x10E sensorJason Gerecke2013-10-231-0/+4
| | | | | | | | | | | | | | | | | | | | | Used in the Fujitsu T732 Signed-off-by: Jason Gerecke <killertofu@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Input: wacom - add support for ISDv4 0x10F sensorJason Gerecke2013-10-231-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>
| * | Input: wacom - export battery scopeBastien Nocera2013-10-161-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This will stop UPower from detecting the tablet as a power supply, and using its battery status to hibernate or switch off the machine. https://bugs.freedesktop.org/show_bug.cgi?id=70321 Signed-off-by: Bastien Nocera <hadess@hadess.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
| * | Merge branch 'next' into for-linusDmitry Torokhov2013-09-072-60/+46Star
| |\ \ | | | | | | | | | | | | Merge first round of changes for 3.12 merge window.
* | | | Input: wacom - add support for three new Intuos devicesPing Cheng2013-11-263-18/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | Input: wacom - make sure touch_max is set for touch devicesPing Cheng2013-11-261-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <killertofu@gmail.com> Signed-off-by: Ping Cheng <pingc@wacom.com> Reviewed-by: Chris Bagwell <chris@cnpbagwell.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | | Input: wacom - scale up touch width and height values for Intuos ProJason Gerecke2013-11-261-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>
* | | Input: wacom - not all multi-interface devices support touchPing Cheng2013-10-232-22/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <killertofu@gmail.com> Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: wacom - add support for three new Intuos Pro devicesPing Cheng2013-09-203-16/+58
| | | | | | | | | | | | | | | | | | Acked-by: Chris Bagwell <chris@cnpbagwell.com> Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: wacom - LED is only supported through digitizer interfacePing Cheng2013-09-201-10/+14
| | | | | | | | | | | | | | | Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: wacom - testing result shows get_report is unnecessary.Ping Cheng2013-09-201-3/+0Star
| | | | | | | | | | | | | | | Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | | Input: wacom - send proper tablet state info when pen leaves proximityJason Gerecke2013-09-201-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>
* | | Input: wacom - support EMR and MFT sensors of Cintiq Companion HybridJason Gerecke2013-09-203-2/+47
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | Merge tag 'v3.11' into nextDmitry Torokhov2013-09-181-1/+11
|\| | | |/ |/| | | Merge with mainline to bring in sync changes to cyttsp4 driver.
| * Input: wacom - add support for 0x300 and 0x301Ping Cheng2013-08-251-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>
| * Input: wacom - add a new stylus (0x100802) for Intuos5 and CintiqsPing Cheng2013-06-191-0/+2
| | | | | | | | | | Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | Input: wacom - fix error return code in wacom_probe()Wei Yongjun2013-08-251-3/+5
| | | | | | | | | | | | | | | | Fix to return a negative error code from the urb submit error handling case instead of 0, as done elsewhere in this function. Signed-off-by: Wei Yongjun <yongjun_wei@trendmicro.com.cn> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* | Input: wacom - integrate resolution calculationPing Cheng2013-08-132-57/+41Star
|/ | | | | | | 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>
* Input: wacom - fix a typo for Cintiq 22HDTPing Cheng2013-06-041-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>
* Input: wacom - add an eraser to DTH2242/DTK2241Ping Cheng2013-05-231-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>
* Input: wacom - add a few new styli for Cintiq seriesPing Cheng2013-05-061-19/+17Star
| | | | | | | | | 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>
* Input: wacom - add three new display tabletsPing Cheng2013-05-062-0/+37
| | | | | | | 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>
* Input: wacom - fix "can not retrieve extra class descriptor" for DTH2242Ping Cheng2013-04-191-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>
* Input: wacom - DTH2242 Grip Pen id was off by one bitPing Cheng2013-04-191-1/+1
| | | | | Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
* Input: wacom - correct reported resolution for Intuos4 WirelessJason Gerecke2013-04-151-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>
* Input: wacom - fix "can not retrieve extra class descriptor" for 24HDTJason Gerecke2013-04-081-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>
* Input: wacom - add support for 0x10dStephan Frank2013-03-101-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>
* Merge branch 'next' into for-linusDmitry Torokhov2013-02-202-102/+92Star
|\ | | | | | | Prepare first set of updates for 3.9 merge window.
| * Input: wacom - add support for DTH-2242Ping Cheng2013-02-142-1/+25
| | | | | | | | | | | | | | 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>
| * Input: wacom - use new input-mt routinesPing Cheng2013-01-062-61/+22Star
| | | | | | | | | | | | | | | | | | 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>
| * Input: wacom - prepare for syncing with input-mt changesPing Cheng2013-01-061-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>
* | Input: wacom - fix wacom_set_report retry logicChris Bagwell2013-01-241-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Logic sets a value and then reads it back to make sure it worked and retries write on failures. Since read and write share a buffer, it needs to be set back up before writing though. Issue is not seen a lot because 1) it doesn't need to retry for a lot of tablets and 2) a lot of failures that need a retry are from an -ETIMEDOUT and hopefully buffer is not touched in this case. At least one user has shown logs with buffer being modified during -ETIMEDOUT case with linux 3.7 kernel. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>