aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/tablet/wacom_wac.c
Commit message (Collapse)AuthorAgeFilesLines
* Input: wacom - Bamboo One 1024 pressure fixChris Bagwell2012-08-151-1/+1
| | | | | | | | | | | | | | | | | | | | | commit 6dc463511d4a690f01a9248df3b384db717e0b1c upstream. Bamboo One's with ID of 0x6a and 0x6b were added with correct indication of 1024 pressure levels but the Graphire packet routine was only looking at 9 bits. Increased to 10 bits. This bug caused these devices to roll over to zero pressure at half way mark. The other devices using this routine only support 256 or 512 range and look to fix unused bits at zero. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Reported-by: Tushant Mirchandani <tushantin@gmail.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Input: wacom - add support for Lenovo tablet ID (0xE6)Manoj Iyer2011-03-311-0/+4
| | | | | | Signed-off-by: Manoj Iyer <manoj.iyer@canonical.com> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - report resolution for pen devicesPing Cheng2011-03-261-92/+179
| | | | | | | | | | | | Touch resolution is reported to the userland by retrieving the value from the HID descriptor. But pen resolution is not since it can not be retrieved. The current Wacom X driver has a resolution table. To centralize the source of these values, the resolution entries are added in the wacom_features struct for x and y coordinates respectively. The values are then reported to the userland. Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - constify wacom_features for a new missed Bamboo modelsPing Cheng2011-03-261-8/+8
| | | | | Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - support 2FGT in MT formatPing Cheng2011-03-121-12/+47
| | | | | | | Reviewed-by: Henrik Rydberg <rydberg@euromail.se> Reviewed-by: Chris Bagwell <chris@cnpbagwell.com> Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - support one finger touch the touchscreen wayPing Cheng2011-03-121-90/+49
| | | | | | | | | | | | | | | | | | | | There are two types of 1FGT devices supported in wacom_wac.c. Changing them to follow the existing touchscreen format, i.e., only report BTN_TOUCH as a valid tool type. Touch data will be ignored if pen is in proximity. This requires a touch up event sent if touch was down when pen comes in. The touch up event should be sent before any pen events are emitted. Otherwise, two pointers would race for the cursor. However, we can not send a touch up inside wacom_tpc_pen since pen and touch are on different logical port. That is why we have to check if touch is up before sending pen events. Reviewed-by: Henrik Rydberg <rydberg@euromail.se> Reviewed-by: Chris Bagwell <chris@cnpbagwell.com> Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - process pen data in its own routinePing Cheng2011-03-121-33/+40
| | | | | | | | | So it would be easier for patch reviewers to follow the data path. Reviewed-by: Henrik Rydberg <rydberg@euromail.se> Reviewed-by: Chris Bagwell <chris@cnpbagwell.com> Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - do not send 2FGT Tablet PC events in TAP formatPing Cheng2011-03-121-76/+8
| | | | | | | | 2FGT Tablet PC touch events were processed in _TAP_ format. Remove them so we can change to _MT_ format. Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - pass touch resolution to clients through input_absinfoPing Cheng2011-01-251-2/+19
| | | | | | | | | 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 <pingc@wacom.com> Reviewed-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - add 2 Bamboo Pen and touch modelsPing Cheng2011-01-241-0/+6
| | | | | | Reported-by: David Foley <favux.is@gmail.com> Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Merge branch 'next' into for-linusDmitry Torokhov2011-01-061-19/+7
|\ | | | | | | | | Conflicts: include/linux/input.h
| * input: mt: Move tracking and pointer emulation to input-mtHenrik Rydberg2010-12-161-18/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The drivers using the type B protocol all report tracking information the same way. The contact id is semantically equivalent to ABS_MT_SLOT, and the handling of ABS_MT_TRACKING_ID only complicates the driver. The situation can be improved upon by providing a common pointer emulation code, thereby removing the need for the tracking id in the driver. This patch moves all tracking event handling over to the input core, simplifying both the existing drivers and the ones currently in preparation. Acked-by: Ping Cheng <pingc@wacom.com> Acked-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
| * input: mt: Collect slots initialization codeHenrik Rydberg2010-12-161-1/+1
| | | | | | | | | | | | | | | | | | The MT slots devices all follow the same initialization pattern of creating slots and hinting about buffer size. Let drivers call an initialization function instead, and make sure it can be called repeatedly without side effects. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
| * input: mt: Break out slots handlingHenrik Rydberg2010-12-161-0/+1
| | | | | | | | | | | | | | In preparation for common code to handle a larger set of MT slots devices, move the slots handling over to a separate file. Signed-off-by: Henrik Rydberg <rydberg@euromail.se>
* | Input: wacom - add support for digitizer in Lenovo W700Ajay Ramaswamy2010-12-231-0/+7
| | | | | | | | | | | | Signed-off-by: Ajay Ramaswamy <ajay@ramaswamy.net> Reviewed-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* | Input: wacom - add another Bamboo Pen ID (0xd4)Kevin Granade2010-12-101-0/+3
| | | | | | | | | | | | | | | | | | Add the features struct and device table entry to enable yet another version of Wacom Bamboo Pen (CTL460, Product ID 0xD4). Signed-off-by: Kevin Granade <kevin.granade@gmail.com> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* | Input: wacom - add new Bamboo PT (0xdb)David Foley2010-12-071-0/+3
| | | | | | | | | | | | | | | | | | | | Adds new Bamboo Pen & Touch model - Bamboo P & T Special Edition Medium (CTH661/L; Product ID = 0xdb). Tested-by: Tobias Verbeke <tobias.verbeke@gmail.com> Signed-off-by: David Foley <favux.is@gmail.com> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* | Input: wacom - add IDs for two new Bamboo PTsDavid Foley2010-11-301-0/+6
|/ | | | | | | | | | | | | Add two new Bamboo Pen & Touch models: Bamboo Comic Medium (CTH661/S1; Product ID = 0xd8) Bamboo P & T Special Edition Small (CTH461/L; Product ID = 0xdA) Tested-by: IRIE Shinsuke <irieshinsuke@yahoo.co.jp> Tested-by: Andrea Cadeddu <mrernia@gmail.com> Signed-off-by: David Foley <favux.is@gmail.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - specify Cinitq supported toolsPing Cheng2010-10-241-12/+30
| | | | | | | | | Cintiq, being a display tablet, doesn't have mouse and associated BTN_s. Make sure we do not specify them when registering Cintiq's input device so that userland can retrieve the exact tool set the device supports. Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Merge branch 'for-linus' into nextDmitry Torokhov2010-10-171-1/+3
|\
| * Input: wacom - fix pressure in Cintiq 21UX2Aristeu Rozanski2010-10-101-1/+3
| | | | | | | | | | | | | | | | | | | | Currently the pressure range in Cintiq 21UX2 is limited to half of the supported. This patch fixes the problem. Signed-off-by: Aristeu Rozanski <aris@redhat.com> Acked-by: Ping Cheng <pingc@wacom.com> CC: stable@kernel.org Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* | Input: wacom - disable Bamboo touchpad when pen is being usedChris Bagwell2010-09-121-1/+7
| | | | | | | | | | | | Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* | Input: wacom - add support for Bamboo PenChris Bagwell2010-09-121-0/+79
| | | | | | | | | | | | | | | | | | This adds support for Pen on Bamboo Pen and Bamboo Pen&Touch devices. Touchpad is handled by previous Bamboo Touch logic. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* | Input: wacom - move Bamboo Touch irq to its own functionChris Bagwell2010-09-121-4/+9
| | | | | | | | | | | | | | | | This is in preparation of pen support in same irq handler. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* | Input: wacom - add a quirk for low resolution Bamboo devicesHenrik Rydberg2010-09-051-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The Bamboo Touch reports a sub-screen resolution of 480x320. The signal-to-noise ratio is only about 100, so filtering is needed in order to reduce the jitter to a usable level. However, the low resolution leads to round-off errors in the EWMA filter, resulting in extremely jerky pointer motion. This patch explicitly sets a higher resolution for those devices, and tells this to the completion handler via a low-resolution quirk. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* | Input: wacom - add support for the Bamboo Touch trackpadHenrik Rydberg2010-09-051-0/+88
| | | | | | | | | | | | | | | | | | | | Add support for the Bamboo Touch trackpad, and make it work with both the Synaptics X Driver and the Multitouch X Driver. The device uses MT slots internally, so the choice of protocol is a given. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* | Input: wacom - collect device quirks into single functionHenrik Rydberg2010-09-051-0/+16
| | | | | | | | | | | | | | | | | | Collect device-specific code into a single function, and use quirks to flag specific behavior instead. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* | Input: wacom - add fuzz parameters to featuresHenrik Rydberg2010-09-051-3/+6
|/ | | | | | | | | | The signal-to-noise ratio varies between devices, but currently all devices are treated the same way. Add fuzz parameters to the feature struct, allowing for tailored treatment of devices. Signed-off-by: Henrik Rydberg <rydberg@euromail.se> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - fix mousewheel handling for old wacom tabletsMike Auty2010-08-281-2/+2
| | | | | | | | | | | | | | | | | | This fixes a regression introduced in 3b57ca0f80c5c8994b5b1e3d3f904cfe727951f2. The data[6] byte contains either 1 or -1 depending on the whether the mouse wheel on older wacom tablets is moved down (1) or up (-1). The patch introduced in the above commit changed the cast from (signed char) to (signed). When cast as a signed integer and negated, the value of -1 (stored in the byte as 0xff) became -255 rather than 1. This patch reverts the cast to a (signed char) and also removes an unnecessary (signed) cast, as all the values operated on are bitmasked. Signed-off-by: Mike Auty <ikelos@gentoo.org> Reviewed-by: Ping Cheng <pingc@wacom.com> Cc; stable@kernel.org Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Merge branch 'next' into for-linusDmitry Torokhov2010-08-101-2/+2
|\
| * Input: switch to input_abs_*() access functionsDaniel Mack2010-08-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | Change all call sites in drivers/input to not access the ABS axis information directly anymore. Make them use the access helpers instead. Also use input_set_abs_params() when possible. Did some code refactoring as I was on it. Signed-off-by: Daniel Mack <daniel@caiaq.de> Cc: Dmitry Torokhov <dtor@mail.ru> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* | Merge branch 'next' into for-linusDmitry Torokhov2010-08-021-0/+44
|\ \ | |/
| * Input: wacom - add support for DTU2231 and DTU1631Ping Cheng2010-06-281-0/+44
| | | | | | | | | | | | | | Add support for the two new devices: DTU2231 and DTU1631. Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* | Input: wacom - fix serial number handling on Cintiq 21UX2Ping Cheng2010-06-221-4/+5
|/ | | | | | | | | Cintiq 21UX2 added 8 more bits for the tool serial number and more buttons for the expresskey. We did not enable them properly in the last patch. Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - add Cintiq 21UX2 and Intuos4 WLPing Cheng2010-06-041-14/+59
| | | | | Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - streamline 2-finger touch supportPing Cheng2010-04-131-71/+77
| | | | | | | | Clean up 2-finger touch support. This still needs to be converted to proper multi-touch protocol. Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - use get_unaligned to access unaligned dataDmitry Torokhov2010-04-131-22/+20
| | | | | | | Also get rid of wacom_le16_to_cpu() and wacom_be16_to_cpu() helpers and ise le16_to_cpup() and be16_to_cpup() directly. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - get rid of wacom_combo structureDmitry Torokhov2010-04-131-36/+45
| | | | | | | | Now that we moved input device from struct wacom to struct wacom_wac, presence of wacom_combo just complicats things for no good reason. Let's get rid of it and simply pass URB length to wacom_wac_irq(). Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - get rid of input event wrappersDmitry Torokhov2010-04-131-219/+330
| | | | | | | | Input event interface is pretty stable so let's get rig of wrappers for input_event() and fiends and call them directly. This will simplify and speed up code a bit. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - fix some formatting issuesDmitry Torokhov2010-04-131-199/+220
| | | | | | | Fix identation of switch/case statements so they follow style used by the rest of the kernel. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - do not allocate wacom_wac separatelyDmitry Torokhov2010-04-131-1/+2
| | | | | | | | There is no reason for allocating struct wacom_wac separately from struct wacom since both have the same lifetime rules and are not shared. Also make 'open' field a boolean. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - share pen info with touch of the same IDPing Cheng2010-04-131-21/+12
| | | | | | | | | | | | | | | | Touch enbaled devices share the same product ID with pen. However, we do not want to post touch events while pen is in prox. To do so, we used to keep a local static variable to keep track of if pen is in prox or not. This works fine for Tablet PC devices since there is only one device attached. With the newer touch enabled regular tablets, we can not make this assumption any more, i.e, one system may have more than one identical tablet plugged in. This patch adds an new entry, shared, into the struct wacom_wac so touch data can access pen data to locally. This solution assumes the two tools (touch and pen) of the same ID will be probed one after the other without interruption in between by another Wacom device of the same ID.
* Input: wacom - merge out and in prox eventsPing Cheng2010-04-131-104/+59
| | | | | | | | | | Process out and in prox events for Graphire and Tablet PC devices in the same loop to simplify the data parsing logic. [re-applying after revert since other patches are based on this one] Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Revert "Input: wacom - merge out and in prox events"Dmitry Torokhov2010-04-131-59/+104
| | | | | | | | | This reverts commit 776943fd6f104a6e8457dc95a17282e69e963666 as it causes issues with ISDv4 E3 touchscreens: https://bugzilla.kernel.org/show_bug.cgi?id=15670 Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - merge out and in prox eventsPing Cheng2010-03-051-104/+59
| | | | | | | | Process out and in prox events for Graphire and Tablet PC devices in the same loop to simplify the data parsing logic. Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - replace WACOM_PKGLEN_PENABLEDPing Cheng2010-03-011-1/+1
| | | | | | | | | Replacing WACOM_PKGLEN_PENABLED with WACOM_PKGLEN_GRAPHIRE since they both represent the same value, 8. This value will be used for both Tablet PC and Bamboo with touch devices. Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - constify product features dataDmitry Torokhov2010-02-191-63/+63
| | | | | | | Features are not supposed to be modified; devices use their own private copies, so let's mark them const. Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - use per-device instance of wacom_featuresJason Childs2010-02-191-30/+36
| | | | | | | | | | | Since we mangle data in wacom_features when dealing with certain devices let's use a private (per-device) instance of wacom_features in wacom_wac. This way same product ID can support more than one type of device, such as pen and touch, and not interfere with each other. Signed-off-by: Jason Childs <oblivian@users.sourceforge.net> Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - get features from driver infoBastian Blank2010-02-101-147/+195
| | | | | | | | | | | Get the features information from the driver info of the usb device id structure provided by the caller. The device ids and feature structs are strong coupled using indices. Signed-off-by: Bastian Blank <waldi@debian.org> Tested-by: Jason Childs <oblivian@users.sourceforge.net> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
* Input: wacom - separate pen from express keys on GraphirePing Cheng2009-12-151-4/+23
| | | | | | | | | Since Graphire/Bamboo devices report pen and expresskeys in the same data packet, we need to send a input_sync event to separate pen data from expresskeys for X11 driver to process them properly. Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>