aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/tablet (follow)
AgeCommit message (Collapse)AuthorFilesLines
2012-03-29Input: wacom - check for allocation failure in probe()Dan Carpenter1-0/+2
We accidentally removed the check for NULL in 3aac0ef10b "Input: wacom - isolate input registration". Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Reviewed-by: Chris Bagwell <chris@cnpbagwell.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-03-27Merge branch 'next' into for-linusDmitry Torokhov5-32/+262
Conflicts: drivers/input/tablet/wacom_sys.c
2012-03-25Input: wacom - wireless battery statusChris Bagwell5-2/+64
Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Tested-by: Jason Gerecke <killertofu@gmail.com> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-03-25Input: wacom - create inputs when wireless connectChris Bagwell4-10/+109
When a tablet connect or disconnect is detected, schedule work queue to register or unregister related input devices. When a wireless tablet connects, it reports same USB PID used if tablet is connected with USB cable. Use this to update features values, set input capabilities, and then register device. From there, the Pen and Touch interfaces will reuse the existing tablet's IRQ routines. Its possible that 1 receiver is shared with 2 tablets with different PID (small and medium Bamboo for example) so the input is unregister at disconnect to better support this case. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Tested-by: Jason Gerecke <killertofu@gmail.com> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-03-25Input: wacom - wireless monitor frameworkChris Bagwell3-6/+62
The 3rd gen Bamboo Pen & Touch and Intuos5 tablets support an optional wireless module. When its receiver is plugged into USB, it presents 3 interfaces: 0) Monitor 1) Pen and 2) Touch. The exact capabilities of the Pen and Touch interfaces can not be determined until a tablet connection is established and reported over the Monitor interface. This patch detects this wireless receiver and enables interrupt packets to be processed for the Monitor interface. Processing the data in packets will be left to another patch. Since it doesn't make sense to create an input device for the Monitor interface, it is not created. Creation of Pen and Touch input device is also delayed until monitor packets can be processed. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Tested-by: Jason Gerecke <killertofu@gmail.com> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-03-25Input: wacom - isolate input registrationChris Bagwell1-20/+33
Although this better co-locates input registration logic, the main goal is to make it easier to optionally create input devices or delay creation to later time periods. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Tested-by: Jason Gerecke <killertofu@gmail.com> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-03-19Merge branch 'next' into for-linusDmitry Torokhov8-123/+29
2012-03-12Input: wacom - fix physical size calculation for 3rd-gen BambooJason Gerecke1-2/+2
This calculation determines the physical dimensions of the tablet, used later on in calculate_touch_res to obtain the touch sensor resolution. Instead of dividing the logical size by the resolution, the current code performs a multiplication. This doesn't pose a problem for the 3rd-gen Bamboo since the resolution and scale factor happen to be identical, but will produce an incorrect result for other cases. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Chris Bagwell <chris@cnpbagwell.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-03-09Merge commit 'v3.3-rc6' into nextDmitry Torokhov7-110/+10
2012-03-07Input: wacom - fix 3rd-gen Bamboo MT when 4+ fingers are in useJason Gerecke1-1/+1
The message count field uses three bits of storage, not two. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Acked-by: Chris Bagwell <chris@cnpbagwell.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-02-24Input: wacom - add missing LEDS_CLASS to KconfigChris Bagwell1-0/+2
Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-01-31Input: wacom - use switch statement for wacom_tpc_irq()Ping Cheng2-6/+20
And add two new data formats. Tested-by: Chris Bagwell <chris@cnpbagwell.com> Reviewed-by: Chris Bagwell <chris@cnpbagwell.com> Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-01-31Input: wacom - use BTN_TOOL_FINGER to indicate touch device typePing Cheng2-7/+3
Tested-by: Chris Bagwell <chris@cnpbagwell.com> Reviewed-by: Chris Bagwell <chris@cnpbagwell.com> Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2012-01-10Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/inputLinus Torvalds4-37/+290
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: (64 commits) Input: tc3589x-keypad - add missing kerneldoc Input: ucb1400-ts - switch to using dev_xxx() for diagnostic messages Input: ucb1400_ts - convert to threaded IRQ Input: ucb1400_ts - drop inline annotations Input: usb1400_ts - add __devinit/__devexit section annotations Input: ucb1400_ts - set driver owner Input: ucb1400_ts - convert to use dev_pm_ops Input: psmouse - make sure we do not use stale methods Input: evdev - do not block waiting for an event if fd is nonblock Input: evdev - if no events and non-block, return EAGAIN not 0 Input: evdev - only allow reading events if a full packet is present Input: add driver for pixcir i2c touchscreens Input: samsung-keypad - implement runtime power management support Input: tegra-kbc - report wakeup key for some platforms Input: tegra-kbc - add device tree bindings Input: add driver for AUO In-Cell touchscreens using pixcir ICs Input: mpu3050 - configure the sampling method Input: mpu3050 - ensure we enable interrupts Input: mpu3050 - add of_match table for device-tree probing Input: sentelic - document the latest hardware ... Fix up fairly trivial conflicts (device tree matching conflicting with some independent cleanups) in drivers/input/keyboard/samsung-keypad.c
2012-01-08Merge branch 'next' into for-linusDmitry Torokhov4-37/+290
2012-01-06Merge branch 'driver-core-next' into Linux 3.2Greg Kroah-Hartman6-110/+6
This resolves the conflict in the arch/arm/mach-s3c64xx/s3c6400.c file, and it fixes the build error in the arch/x86/kernel/microcode_core.c file, that the merge did not catch. The microcode_core.c patch was provided by Stephen Rothwell <sfr@canb.auug.org.au> who was invaluable in the merge issues involved with the large sysdev removal process in the driver-core tree. Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-12-12Input: wacom - add LED support for Cintiq 24HDJason Gerecke1-1/+4
The Cintiq 24HD has three LEDs on the left side of the tablet and three LEDs on the right side of the tablet. Switching to LED 0, 1, or 2 will enable the top, middle, or bottom LED for the respective side. Switching to LED 3 turns off the LEDs on the respective side. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-12-12Input: wacom - add support for Cintiq 24HDJason Gerecke2-1/+77
Adds support for the Cintiq 24HD. There are two quirks about this model that haven't been seen in prior tablets. First, a second touch ring is present on this display; it is being exposed via the ABS_THROTTLE axis. Second, three capacitive buttons at the top of the unit are available; though physically a touch strip, we report the use of these buttons with generic KEY_ events. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-12-12Input: wacom - add product id used by Samsung Slate 7Chris Bagwell1-0/+4
New product ID reported by Harvey Braun on linuxwacom mailing list and also tested this patch with new hardware. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Acked-by: Ping Cheng <pinglinux@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-11-29Merge commit 'v3.2-rc3' into nextDmitry Torokhov2-29/+37
2011-11-18USB: convert drivers/input/* to use module_usb_driver()Greg Kroah-Hartman6-110/+6
This converts the drivers in drivers/input/* to use the module_usb_driver() macro which makes the code smaller and a bit simpler. Added bonus is that it removes some unneeded kernel log messages about drivers loading and/or unloading. Cc: Dmitry Torokhov <dmitry.torokhov@gmail.com> Cc: Ville Syrjala <syrjala@sci.fi> Cc: Henk Vergonet <Henk.Vergonet@gmail.com> Cc: Alessandro Rubini <rubini@ipvvis.unipv.it> Cc: Henrik Rydberg <rydberg@euromail.se> Cc: "Magnus Hörlin" <magnus@alefors.se> Cc: Chris Moeller <kode54@gmail.c> Cc: Christoph Fritz <chf.fritz@googlemail.com> Cc: Lucas De Marchi <lucas.demarchi@profusion.mobi> Cc: Jesper Juhl <jj@chaosbits.net> Cc: Edwin van Vliet <edwin@cheatah.nl> Cc: Ping Cheng <pingc@wacom.com> Cc: Eduard Hasenleithner <eduard@hasenleithner.at> Cc: Alexander Strakh <strakh@ispras.ru> Cc: Glenn Sommer <gsommer@datanordisk.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
2011-11-09Input: convert obsolete strict_strtox to kstrtoxJJ Ding1-15/+19
With commit 67d0a0754455f89ef3946946159d8ec9e45ce33a we mark strict_strtox as obsolete. Convert all remaining such uses in drivers/input/. Also change long to appropriate types, and return error conditions from kstrtox separately, as Dmitry sugguests. Signed-off-by: JJ Ding <dgdunix@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-11-07Input: wacom - ignore unwanted bamboo packetsChris Bagwell1-0/+9
Bamboo's Pen and Touch packets always start with a value of 0x02 in first byte. In 3rd gen Bamboo's, the hw is now periodically sending some additional packets with unrelated data and uses a value other than 0x02 to inform driver this. Ignore those packets now. This was reported by users as bad behavior in Gimp. The invalid packets being processed made the stylus report out of proximity for the 1 packet and this triggered some secondary bug which caused Gimp to stop drawing until user really took pen out of proximity of tablet. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-10-26Input: wacom - 3rd gen Bamboo P&Touch packet supportChris Bagwell2-5/+92
3rd generation Bamboo Pen and Touch tablets reuse the older stylus packet but add an extra fixed zero pad byte to end. The touch packets are quite different since it supports tracking of up to 16 touches. The packet is 64-byte fixed size but contains up to 15 smaller messages indicating data for a single touch or for tablet button presses. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-10-26Input: wacom - read 3rd gen Bamboo Touch HID dataChris Bagwell2-2/+48
Override invalid pen based pktlen and x/y_max with touch values from HID report. Since active area of pen and touch are same on these devices, set physical x/y size while pen x/y_max and resolution are still valid. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-10-26Input: wacom - relax Bamboo stylus ID checkChris Bagwell1-6/+1
Bit 0x02 always means tip versus eraser. Bit 0x01 is something related to version of stylus and different values are starting to be used. Relaxing proximity check is required to be used with 3rd generation Bamboo Pen and Touch tablets. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-10-26Input: wacom - add some comments to wacom_parse_hidChris Bagwell1-1/+36
Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-10-26Input: wacom - remove unused bamboo HID parsingChris Bagwell1-4/+0
Bamboo's do not declared a Digitizer-Stylus so the if() was never executed. wacom_features already contains correct stylus packet length. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-10-26Input: wacom - cleanup feature report for bamboosChris Bagwell1-2/+4
Only the stylus interface on Bamboo's has a feature report that can be used to set to wacom mode. The touch interface only has 1 report mode and will return errors for those get/sets requests. The get request was always erroring out because it was not marked as an input request. Only down side of error was needlessly resending the set request 5 times. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-10-26Merge branch 'next' into for-linusDmitry Torokhov3-53/+361
2011-10-10Input: wacom - correct max Y value on medium bamboosChris Bagwell1-4/+4
Medium size Bamboo P&T driver reused max X/Y form older Bamboo 1 medium size tablets and never updated to real value. Actual active area of tablet is slightly larger in Y direction. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Acked-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-10-10Input: wacom - add ABS_DISTANCE to Bamboo Pen reportsChris Bagwell1-12/+23
Tablet reports a distance of 0 right at highest point possible to be in proximity and distance_max when touching tablet. Inverse the distance since user land has no way of knowing ABS_DISTANCE is not distance from tablet. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-10-10Input: wacom - remove unneeded touch pressure initializationChris Bagwell1-5/+0
These were left in during removal of touch pressure reports but not needed now. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-10-05Input: wacom - make LED status readable through sysfsPing Cheng1-1/+8
Reviewed-by: Eduard Hasenleithner <eduard@hasenleithner.at> Tested-by: Eduard Hasenleithner <eduard@hasenleithner.at> Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-10-05Input: wacom - add LED support for Cintiq 21ux2Ping Cheng2-30/+78
Cintiq 21ux2 has two sets of four LEDs on right and left side of the tablet, respectively. Reviewed-by: Eduard Hasenleithner <eduard@hasenleithner.at> Tested-by: Eduard Hasenleithner <eduard@hasenleithner.at> Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-10-05Input: wacom - don't expose LED inactive optionPing Cheng1-3/+3
The LED also indicates the status of the tablet. Don't turn it off. Reviewed-by: Eduard Hasenleithner <eduard@hasenleithner.at> Tested-by: Eduard Hasenleithner <eduard@hasenleithner.at> Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-10-05Input: wacom - lower the LED luminancePing Cheng1-1/+1
The LED luminance level is normally lower when no button is pressed. Reviewed-by: Eduard Hasenleithner <eduard@hasenleithner.at> Tested-by: Eduard Hasenleithner <eduard@hasenleithner.at> Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-10-04Input: wacom - revert "Cintiq 21UX2 does not have menu strips"Jason Gerecke1-5/+2
This reverts commit 71c86ce59791bcd67af937bbea719a508079d7c2. The 21UX2 does have touchstrips, but they are in a somewhat- hidden location. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Acked-by: Ping Cheng <pinglinux@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-09-12Input: wacom - fix touch parsing on newer BamboosChris Bagwell1-6/+8
Bamboos with Product ID's > 0xD4 return values unrelated to pressure in touch 1 pressure field. They also report 2nd touch X/Y values shifted down 1 byte (where pressure was). This results in jumpy 1 finger touch and totally invalid 2nd finger data. For touch detection, switch to a Touch Present single bit that all versions of Bamboo support. For touch 2 offset, calculate offset based on a bit that is set different between the two packet layouts. Since touch pressure reports were removed from driver, there was no need to be reading pressure any more. Signed-off-by: Chris Bagwell <chris@cnpbagwell.com> Reviewed-by: Ping Cheng <pinglinux@gmail.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-09-08Input: wacom - add POINTER and DIRECT device propertiesJason Gerecke1-1/+24
Adds INPUT_PROP_POINTER or INPUT_PROP_DIRECT as necessary to the hardware supported by the Wacom driver. The DIRECT property is assigned to devices with an embedded screen (i.e. touchscreens and display tablets). The POINTER property is assigned to those without embedded screens. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-09-07Input: wacom - add Intuos4 LED and OLED controlEduard Hasenleithner2-30/+277
This commit enables control of the LEDs and OLED displays found on the Wacom Intuos4 M, L, and XL. For this purpose, a new "wacom_led" attribute group is added to the sysfs entry of the USB device. This "wacom_led" group only shows up when the correct device (M, L, or XL) is detected. The attributes are described in Documentation/ABI/testing/sysfs-wacom Signed-off-by: Eduard Hasenleithner <eduard@hasenleithner.at> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-26Input: wacom - advertise BTN_TOOL_PEN and BTN_STYLUS for PenPartnerJason Gerecke1-2/+2
The Wacom PenPartner should advertise its stylus tip and button in addition to the eraser tool. These are both physically present on the hardware, and emitted from 'wacom_penpartner_irq'. Signed-off-by: Jason Gerecke <killertofu@gmail.com> Reviewed-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-26Input: wacom - remove pressure for touch devicesPing Cheng2-17/+3
Touch devices do not report valid pressure or capacitance. Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-16Input: wacom - report id 3 returns 4 bytes of dataPing Cheng1-4/+6
Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-16Input: wacom - add WAC_MSG_RETRIES definePing Cheng1-3/+4
Use WAC_MSG_RETRIES define instead of a numeric constant. Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-08-16Input: wacom - add support for the Wacom Bamboo Pen (CTL-660/K)Gerard Braad1-0/+4
Signed-off-by: Gerard Braad <me@gbraad.nl> Reviewed-by: Chris Bagwell <chris@cnpbagwell.com> Signed-off-by: Ping Cheng <pingc@wacom.com> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-10Input: aiptek - remove double defineEdwin van Vliet1-1/+0
Constant AIPTEK_TOOL_BUTTON_PEN_MODE was defined twice. Signed-off-by: Edwin van Vliet <edwin@cheatah.nl> Reviewed-by: Jesper Juhl <jj@chaosbits.net> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-06Input: wacom - cleanup a return value for the old BambooPing Cheng1-1/+1
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 <pingc@wacom.com> Reviewed-by: Chris Bagwell <chris@cnpbagwell.com> Reviewed-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-06Input: wacom - update Graphire4 and old Bamboo tablet buttonsPing Cheng1-11/+8
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 <pingc@wacom.com> Reviewed-by: Chris Bagwell <chris@cnpbagwell.com> Reviewed-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>
2011-07-06Input: wacom - add serial number for Graphire4 and old BambooPing Cheng1-0/+1
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 <pingc@wacom.com> Reviewed-by: Chris Bagwell <chris@cnpbagwell.com> Reviewed-by: Henrik Rydberg <rydberg@euromail.se> Signed-off-by: Dmitry Torokhov <dtor@mail.ru>