aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2014-06-15Input: wacom - cleanup multitouch code when touch_max is 2Ping Cheng1-21/+7
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]>
2014-06-07Merge branch 'next' into for-linusDmitry Torokhov10907-256586/+616187
Prepare input updates for 3.16.
2014-06-07Input: synaptics - fix resolution for manually provided min/maxBenjamin Tissoires1-9/+10
commit 421e08c41fda fixed the reported min/max for the X and Y axis, but unfortunately, it broke the resolution of those same axis. On the t540p, the resolution is the same regarding X and Y. It is not a problem for xf86-input-synaptics because this driver is only interested in the ratio between X and Y. Unfortunately, xf86-input-cmt uses directly the resolution, and having a null resolution leads to some divide by 0 errors, which are translated by -infinity in the resulting coordinates. Reported-by: Peter Hutterer <[email protected]> Signed-off-by: Benjamin Tissoires <[email protected]> Cc: [email protected] Signed-off-by: Dmitry Torokhov <[email protected]>
2014-06-07Input: atmel_mxt_ts - fix invalid return from mxt_get_bootloader_versionNick Dyer1-1/+1
The patch e57a66aa8534: "Input: atmel_mxt_ts - read and report bootloader version" from May 18, 2014, leads to the following static checker warning: drivers/input/touchscreen/atmel_mxt_ts.c:437 mxt_get_bootloader_version() warn: signedness bug returning '(-5)' drivers/input/touchscreen/atmel_mxt_ts.c 429 static u8 mxt_get_bootloader_version(struct mxt_data *data, u8 val) 430 { 431 struct device *dev = &data->client->dev; 432 u8 buf[3]; 433 434 if (val & MXT_BOOT_EXTENDED_ID) { 435 if (mxt_bootloader_read(data, &buf[0], 3) != 0) { 436 dev_err(dev, "%s: i2c failure\n", __func__); 437 return -EIO; ^^^^ This gets truncated into a number from 0-255 and anyway the caller doesn't check for errors. (reported by Dan Carpenter) Signed-off-by: Nick Dyer <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-06-07Input: max8997_haptic - add error handling for regulator and pwmSachin Kamat1-4/+14
Let's start checking return value of regulator_enable and pwm_enable to avoid errors. Fixes the following warning: drivers/input/misc/max8997_haptic.c:185:19: warning: ignoring return value of ‘regulator_enable’, declared with attribute warn_unused_result [-Wunused-result] Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-06-07Input: elantech - don't set bit 1 of reg_10 when the no_hw_res quirk is setHans de Goede1-2/+3
The touchpad on the GIGABYTE U2442 not only stops communicating when we try to set bit 3 (enable real hardware resolution) of reg_10, but on some BIOS versions also when we set bit 1 (enable two finger mode auto correct). I've asked the original reporter of: https://bugzilla.kernel.org/show_bug.cgi?id=61151 To check that not setting bit 1 does not lead to any adverse effects on his model / BIOS revision, and it does not, so this commit fixes the touchpad not working on these versions by simply never setting bit 1 for laptop models with the no_hw_res quirk. Reported-and-tested-by: James Lademann <[email protected]> Tested-by: Philipp Wolfer <[email protected]> Cc: [email protected] Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-06-07Input: elantech - deal with clickpads reporting right button eventsHans de Goede1-4/+18
At least the Dell Vostro 5470 elantech *clickpad* reports right button clicks when clicked in the right bottom area: https://bugzilla.redhat.com/show_bug.cgi?id=1103528 This is different from how (elantech) clickpads normally operate, normally no matter where the user clicks on the pad the pad always reports a left button event, since there is only 1 hardware button beneath the path. It looks like Dell has put 2 buttons under the pad, one under each bottom corner, causing this. Since this however still clearly is a real clickpad hardware-wise, we still want to report it as such to userspace, so that things like finger movement in the bottom area can be properly ignored as it should be on clickpads. So deal with this weirdness by simply mapping a right click to a left click on elantech clickpads. As an added advantage this is something which we can simply do on all elantech clickpads, so no need to add special quirks for this weird model. Reported-and-tested-by: Elder Marco <[email protected]> Cc: [email protected] Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-06-07Input: edt-ft5x06 - fix an i2c write for M09 supportRobert Woerle1-1/+1
The driver sends 3 bytes instead of 2 when accessing a register on the M09 firmware, so writing to gain seems to overflow into the offset register. Signed-off-by: Robert Woerle <[email protected]> Acked-By: Simon Budig <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-29Input: omap-keypad - remove platform data supportJoachim Eastwood3-40/+7
This is unused since all users (OMAP4/5) are DT only. Signed-off-by: Joachim Eastwood <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-29ARM: OMAP2+: remove unused omap4-keypad file and codeJoachim Eastwood2-41/+0
This has been unused since omap4 board files went away. Signed-off-by: Joachim Eastwood <[email protected]> Acked-by: Tony Lindgren <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-29Input: ab8500-ponkey - switch to using managed resourcesHimangi Saraogi1-36/+18
Let's switch the driver to use managed resources, this will simplify error handling and driver unbinding logic. Signed-off-by: Himangi Saraogi <[email protected]> Acked-by: Julia Lawall <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-29Input: max8925_onkey - switch to using managed resourcesHimangi Saraogi1-37/+18
Let's switch the driver to use managed resources, this will simplify error handling and driver unbinding logic. Signed-off-by: Himangi Saraogi <[email protected]> Acked-by: Julia Lawall <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-29Input: 88pm860x-ts - switch to using managed resourcesHimangi Saraogi1-28/+13
Let's switch the driver to use managed resources, this will simplify error handling and driver unbinding logic. Signed-off-by: Himangi Saraogi <[email protected]> Acked-by: Julia Lawall <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-29Input: 88pm860x_onkey - switch to using managed resourcesHimangi Saraogi1-30/+10
Let's switch the driver to use managed resources, this will simplify error handling and driver unbinding logic. Signed-off-by: Himangi Saraogi <[email protected]> Acked-by: Julia Lawall <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-29Input: intel-mid-touch - switch to using managed resourcesHimangi Saraogi1-30/+17
Let's switch the driver to use managed resources, this will simplify error handling and driver unbinding logic. Signed-off-by: Himangi Saraogi <[email protected]> Acked-by: Julia Lawall <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-29Input: wacom - process outbound for newer CintiqsPing Cheng2-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 <[email protected]> Reviewed-by: Jason Gerecke <[email protected]> Tested-by: Jason Gerecke <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-29Input: wacom - set stylus_in_proximity when pen is in rangePing Cheng1-0/+2
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]>
2014-05-29DTS: ARM: OMAP3-N900: Add tsc2005 supportSebastian Reichel1-1/+16
This adds support for the tsc2005 touchscreen to the Nokia N900 DTS file. Signed-off-by: Sebastian Reichel <[email protected]> Acked-by: Tony Lindgren <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-29Input: tsc2005 - add DT supportSebastian Reichel2-20/+146
This adds DT support to the tsc2005 touchscreen driver. It also adds regulator support to the driver if booted via DT. Reviewed-by: Pavel Machek <[email protected]> Acked-by: Aaro Koskinen <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-29Input: add common DT binding for touchscreensSebastian Reichel5-0/+99
Add common DT binding documentation for touchscreen devices and implement input_parse_touchscreen_of_params, which parses the common properties and configures the input device accordingly. The method currently does not interpret the axis inversion properties, since there is no matching flag in the generic linux input device. Reviewed-by: Pavel Machek <[email protected]> Acked-by: Aaro Koskinen <[email protected]> Signed-off-by: Sebastian Reichel <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-28Input: jornada680_kbd - switch top using managed resourcesHimangi Saraogi1-26/+10
Let's switch the driver to use managed resources, this will simplify error handling and driver unbinding logic. Signed-off-by: Himangi Saraogi <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-28Input: adp5520-keys - switch to using managed resourcesHimangi Saraogi1-22/+10
Let's switch the driver to use managed resources, this will simplify error handling and driver unbinding logic. Signed-off-by: Himangi Saraogi <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-28Input: da9034-ts - switch to using managed resourcesHimangi Saraogi1-28/+11
Let's switch the driver to use managed resources, this will simplify error handling and allows us to get rid of da9034_touch_remove(). Signed-off-by: Himangi Saraogi <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-28Input: mcs5000_ts - switch to using managed resourcesBeomho Seo1-47/+34
Let's switch the driver to use managed resources, this will simplify error handling and driver unbinding logic. Signed-off-by: Beomho Seo <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-28Input: mcs5000_ts - fix incorrect input device nameBeomho Seo1-1/+1
This patch fix a typo error in MELFAS MCS-5000 controller driver. Signed-off-by: Beomho Seo <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-28Input: mms114 - fix incorrect input device nameBeomho Seo1-1/+1
This patch fix a typo error in mms114 touchscreen driver. Signed-off-by: Beomho Seo <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-28Input: mcs_touchkey - fix incorrect input device nameBeomho Seo1-1/+1
This patch fix a typo error in MELFAS 5000/5080 controller driver. Signed-off-by: Beomho Seo <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-28Input: soc_button_array - remove duplicate inclusion of input.hSachin Kamat1-1/+0
input.h was included twice. Signed-off-by: Sachin Kamat <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-26Input: atmel_mxt_ts - handle multiple input reports in one messageNick Dyer1-8/+28
Signed-off-by: Nick Dyer <[email protected]> Acked-by: Benson Leung <[email protected]> Acked-by: Yufeng Shen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-26Input: atmel_mxt_ts - rename touchscreen defines to include T9Nick Dyer1-23/+23
This avoids confusion with the newer T100 touchscreen object. Signed-off-by: Nick Dyer <[email protected]> Acked-by: Benson Leung <[email protected]> Acked-by: Yufeng Shen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-26Input: atmel_mxt_ts - rename pressure to amplitude to match specNick Dyer1-4/+4
Signed-off-by: Nick Dyer <[email protected]> Acked-by: Benson Leung <[email protected]> Acked-by: Yufeng Shen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-26Input: atmel_mxt_ts - read screen config from chipNick Dyer4-95/+65
By reading the touchscreen configuration from the settings that the maXTouch chip is actually using, we can remove some platform data. The matrix size is not used for anything, and results in some rather confusing code to re-read it because it may change when configuration is downloaded, so don't print it out. Signed-off-by: Nick Dyer <[email protected]> Acked-by: Benson Leung <[email protected]> Acked-by: Yufeng Shen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-26Input: synaptics - change min/max quirk table to pnp-id matchingHans de Goede1-113/+36
Most of the affected models share pnp-ids for the touchpad. So switching to pnp-ids give us 2 advantages: 1) It shrinks the quirk list 2) It will lower the new quirk addition frequency, ie the recently added W540 quirk would not have been necessary since it uses the same LEN0034 pnp ids as other models already added before it As an added bonus it actually puts the quirk on the actual psmouse, rather then on the machine, which is technically more correct. Cc: [email protected] Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-26Input: synaptics - add a matches_pnp_id helper functionHans de Goede1-11/+14
This is a preparation patch for simplifying the min/max quirk table. Cc: [email protected] Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-26Input: synaptics - T540p - unify with other LEN0034 modelsHans de Goede1-1/+1
The T540p has a touchpad with pnp-id LEN0034, all the models with this pnp-id have the same min/max values, except the T540p where the values are slightly off. Fix them to be identical. This is a preparation patch for simplifying the quirk table. Cc: [email protected] Signed-off-by: Hans de Goede <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-18Input: atmel_mxt_ts - add check for incorrect firmware file formatNick Dyer1-0/+29
Atmel supplies firmware files in ASCII HEX format (.enc) which must be converted before they can be loaded by kernel driver. Try to detect the error and print a friendly error message rather than feeding junk to the bootloader. Signed-off-by: Nick Dyer <[email protected]> Acked-by: Benson Leung <[email protected]> Acked-by: Yufeng Shen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-18Input: atmel_mxt_ts - improve bootloader progress outputNick Dyer1-1/+7
By implementing a frame counter, print out fewer debug messages (the firmware may contain hundreds of frames). Signed-off-by: Nick Dyer <[email protected]> Acked-by: Benson Leung <[email protected]> Acked-by: Yufeng Shen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-18Input: atmel_mxt_ts - implement bootloader frame retriesNick Dyer1-7/+20
Signed-off-by: Nick Dyer <[email protected]> Acked-by: Benson Leung <[email protected]> Acked-by: Yufeng Shen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-18Input: atmel_mxt_ts - read and report bootloader versionNick Dyer1-0/+26
Signed-off-by: Nick Dyer <[email protected]> Acked-by: Benson Leung <[email protected]> Acked-by: Yufeng Shen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-18Input: atmel_mxt_ts - add additional bootloader addressesNick Dyer1-45/+93
Move bootloaders reads/writes into separate functions. Instead of switching client->addr, define new field bootloader_addr in mxt_data. Implement lookup calculation for bootloader addresses. Signed-off-by: Nick Dyer <[email protected]> Acked-by: Benson Leung <[email protected]> Acked-by: Yufeng Shen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-18Input: atmel_mxt_ts - implement CRC check for configuration dataNick Dyer2-8/+53
The configuration is stored in NVRAM on the maXTouch chip. When the device is reset it reports a CRC of the stored configuration values. Therefore it isn't necessary to send the configuration on each probe - we can check the CRC matches and avoid a timeconsuming backup/reset cycle. Signed-off-by: Nick Dyer <[email protected]> Acked-by: Benson Leung <[email protected]> Acked-by: Yufeng Shen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-18Input: atmel_mxt_ts - improve error reporting and debugNick Dyer1-10/+23
- Add error messages for probe errors - Report type in invalid object type - Tweak some other debug output messages Signed-off-by: Nick Dyer <[email protected]> Acked-by: Benson Leung <[email protected]> Acked-by: Yufeng Shen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-18Input: atmel_mxt_ts - make wait-after-reset period compatible with all chipsIiro Valkonen1-22/+87
The delay before the chip can be accessed after reset varies between different chips in maXTouch family. Waiting for an interrupt and a T6 status message with the RESET bit set is a better behaviour. Signed-off-by: Nick Dyer <[email protected]> Acked-by: Benson Leung <[email protected]> Acked-by: Yufeng Shen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-18Input: atmel_mxt_ts - wait for CHG after bootloader resetsBenson Leung1-7/+15
Rather than msleep for MXT_RESET_TIME and MXT_FWRESET_TIME during the transition to bootloader mode and the transition back from app, wait for the CHG assert to indicate that the transition is done. This change replaces the msleep with a wait for completion that the mxt_interrupt handler signals. Also add CHG poll after last firmware frame - some bootloader versions will assert the interrupt line after the final frame, in testing this meant that the driver attempts to read the info block too early whilst the chip is still resetting. This improves firmware update time as we no longer wait longer than necessary for each reset. Signed-off-by: Benson Leung <[email protected]> Signed-off-by: Daniel Kurtz <[email protected]> Signed-off-by: Nick Dyer <[email protected]> Acked-by: Yufeng Shen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-18Input: atmel_mxt_ts - wait for CHG assert in mxt_check_bootloaderBenson Leung1-21/+81
The driver should not immediately read bootloader status when in Application Update Mode. The CHG line will assert when the device has made a state transition and is ready to report a new status via i2c. This change adds a wait for completion in mxt_check_bootloader, and changes the mxt_interrupt handler to signal the completion. Signed-off-by: Benson Leung <[email protected]> Signed-off-by: Daniel Kurtz <[email protected]> Signed-off-by: Nick Dyer <[email protected]> Acked-by: Yufeng Shen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-18Input: atmel_mxt_ts - select FW_LOADER for firmware codeNick Dyer1-0/+1
Signed-off-by: Nick Dyer <[email protected]> Acked-by: Benson Leung <[email protected]> Acked-by: Yufeng Shen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-18Input: atmel_mxt_ts - define helper functions for size and instancesDaniel Kurtz1-12/+25
These two object table entry fields are reported 1 less than their value. When used, however, we always want the actual size and instances. To keep the object size and instances 1-byte fields, and thus preserve the object-table struct's 6-byte packed alignment, add some convenient accessor functions that do the +1 every time these fields are accessed. Signed-off-by: Daniel Kurtz <[email protected]> Signed-off-by: Nick Dyer <[email protected]> Acked-by: Benson Leung <[email protected]> Acked-by: Yufeng Shen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-18Input: atmel_mxt_ts - return IRQ_NONE when interrupt handler failsNick Dyer1-2/+1
Signed-off-by: Nick Dyer <[email protected]> Acked-by: Benson Leung <[email protected]> Acked-by: Yufeng Shen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-18Input: atmel_mxt_ts - improve T19 GPIO keys handlingNick Dyer3-38/+30
* The mapping of the GPIO numbers into the T19 status byte varies between different maXTouch chips. Some have up to 7 GPIOs. Allowing a keycode array of up to 8 items is simpler and more generic. So replace #define with configurable number of keys which also allows the removal of is_tp. * Rename platform data parameters to include "t19" to prevent confusion with T15 key array. * Probe aborts early on when pdata is NULL, so no need to check. * Move "int i" to beginning of function (mixed declarations and code) * Use API calls rather than __set_bit() * Remove unused dev variable. Signed-off-by: Nick Dyer <[email protected]> Acked-by: Yufeng Shen <[email protected]> Reviewed-by: Henrik Rydberg <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>
2014-05-18Input: atmel_mxt_ts - remove unnecessary platform dataNick Dyer4-70/+1
It is not necessary to download these values to the maXTouch chip on every probe, since they are stored in NVRAM. It makes life difficult when tuning the device to keep them in sync with the config array/file, and requires a new kernel build for minor tweaks. These parameters only represent a tiny subset of the available configuration options, tracking all of these options in platform data would be a endless task. In addition, different versions of maXTouch chips may have these values in different places or may not even have them at all. Having these values also makes life more complex for device tree and other platforms where having to define a static configuration isn't helpful. Signed-off-by: Nick Dyer <[email protected]> Acked-by: Benson Leung <[email protected]> Acked-by: Yufeng Shen <[email protected]> Signed-off-by: Dmitry Torokhov <[email protected]>