aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/input/touchscreen (follow)
AgeCommit message (Collapse)AuthorFilesLines
2018-01-31Input: goodix - use generic touchscreen_propertiesMarcin Niestroj1-83/+58
Use touchscreen_properties structure instead of implementing all properties by our own. It allows us to reuse generic code for parsing device-tree properties (which was implemented manually in the driver for now). Additionally, it allows us to report events using generic touchscreen_report_pos(), which automatically handles inverted and swapped axes. This fixes the issue with the custom code incorrectly handling case where ts->inverted_x and ts->swapped_x_y were true, but ts->inverted_y was false. Assuming we have 720x1280 touch panel, ts->abs_x_max == 1279 and ts->abs_y_max == 719 (because we inverted that in goodix_read_config()). Now let's assume that we received event from (0:0) position (in touch panel original coordinates). In function goodix_ts_report_touch() we calculate input_x as 1279, but after swapping input_y takes that value (which is more that maximum 719 value reported during initialization). Note that since touchscreen coordinates are 0-indexed, we now report touchscreen range as (0:size-1). Developed and tested on custom DT-based device with gt1151 touch panel. Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com> [dtor: fix endianness annotation reported by sparse, handle errors when initializing MT slots] Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-01-31Input: mms114 - fix typo in definitionAndi Shyti1-2/+2
It's 'MMS114_INFORMATION', not 'MMS114_INFOMATION' Signed-off-by: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-01-30Input: mms114 - use BIT() macro instead of explicit shiftingAndi Shyti1-1/+1
Signed-off-by: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-01-30Input: mms114 - replace mdelay with msleepAndi Shyti1-1/+1
200 milliseconds is a very long time to keep the CPU busy looping. Use msleep instead. Signed-off-by: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-01-26Input: mms114 - add support for mms152Simon Shields1-19/+73
MMS152 has no configuration registers, but the packet format used in interrupts is identical to mms114. Signed-off-by: Simon Shields <simon@lineageos.org> Reviewed-by: Andi Shyti <andi.shyti@samsung.com> Tested-by: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-01-26Input: mms114 - drop platform data and use generic APIsSimon Shields1-82/+65
The MMS114 platform data has no in-tree users, so drop it. Switch to using the standard touchscreen properties via touchscreen_parse_properties(), and move the old DT parsing code to use device_property_*() APIs. Finally, use touchscreen_report_pos to report x/y coordinates and drop the custom x/y inversion code. Signed-off-by: Simon Shields <simon@lineageos.org> Reviewed-by: Rob Herring <robh@kernel.org> Reviewed-by: Andi Shyti <andi.shyti@samsung.com> Tested-by: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-01-26Input: mms114 - mark as direct input deviceDmitry Torokhov1-8/+5
mms14 is a touchscreen and thus a direct input device; let's mark it as such. This also allows us to drop some initialization code as input_init_mt_slots() will do that for us. Also add error handling for input_mt_init_slots(). Reviewed-by: Simon Shields <simon@lineageos.org> Tested-by: Simon Shields <simon@lineageos.org> Reviewed-by: Andi Shyti <andi.shyti@samsung.com> Tested-by: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-01-26Input: mms114 - do not clobber interrupt triggerDmitry Torokhov1-3/+3
Rely on the platform (device tree, ACPI, etc) to properly configure interrupt trigger/polarity instead of hardcoding the falling edge. Reviewed-by: Simon Shields <simon@lineageos.org> Tested-by: Simon Shields <simon@lineageos.org> Reviewed-by: Andi Shyti <andi.shyti@samsung.com> Tested-by: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-01-24Input: edt-ft5x06 - fix error handling for factory mode on non-M06Dmitry Torokhov1-8/+6
When attempting enter factory mode on firmware that does not support it, we'd error out, but leave the device with interrupts disabled, and thus touch not working. Fix it by moving the check before we disable interrupts/allocate memory for debug buffers. Fixes: fd335ab04b3f ("Input: edt-ft5x06 - add support for M09 firmware version") Reviewed-by: Andi Shyti <andi@etezian.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-01-22Input: stmfts - set IRQ_NOAUTOEN to the irq flagAndi Shyti1-3/+8
The interrupt is requested before the device is powered on and it's value in some cases cannot be reliable. It happens on some devices that an interrupt is generated as soon as requested before having the chance to disable the irq. Set the irq flag as IRQ_NOAUTOEN before requesting it. This patch mutes the error: stmfts 2-0049: failed to read events: -11 received sometimes during boot time. Signed-off-by: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-01-22Input: auo-pixcir-ts - delete an unnecessary return statementMarkus Elfring1-2/+0
The script "checkpatch.pl" pointed information out like the following: WARNING: void function return statements are not generally useful Thus remove such a statement in the affected function. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-01-22Input: auo-pixcir-ts - remove custom log for a failed memory allocationMarkus Elfring1-3/+1
Omit an extra message for a memory allocation failure in this function. This issue was detected by using the Coccinelle software. Signed-off-by: Markus Elfring <elfring@users.sourceforge.net> Reviewed-by: Heiko Stuebner <heiko@sntech.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-01-22Input: da9052_tsi - remove unused mutexMarcus Folkesson1-1/+0
Signed-off-by: Marcus Folkesson <marcus.folkesson@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-01-22Input: ad7877 - use managed resource allocationsAndi Shyti1-44/+23
Use managed resource allocations to simplify error handling during probing failure and module exiting. With this all the goto labels in the probe function together with the cleanups in the remove function are unnecessary, therefore removed. Signed-off-by: Andi Shyti <andi@etezian.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-01-22Input: stmfts,s6sy671 - add SPDX identifierAndi Shyti2-20/+10
Replace the original license statement with the SPDX identifier. Update also the copyright owner adding myself as co-owner of the copyright. Signed-off-by: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-01-19Input: remove atmel-wm97xx touchscreen driverCorentin Labbe3-452/+0
Since AVR32 arch is gone, atmel-wm97xx driver is useless. In theory it could have been rewritten to work with AT91 devices, but the driver is from the platform data era, and a bit hard coded to work on AVR32 hardware variant of the AC97C peripheral, so let's remove it. Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com> Acked-by: Hans-Christian Noren Egtvedt <egtvedt@samfundet.no> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-01-17Input: inline macros for MODULE_LICENSE, etcJulia Lawall1-7/+2
Inline macro for MODULE_LICENSE to make the license information easy to find, eg with grep. Inline the other module-related macros at the same time. A simplified version of the semantic patch for the MODULE_LICENSE case is as follows: (http://coccinelle.lip6.fr/) // <smpl> @s@ identifier i; expression e; @@ @@ declarer name MODULE_LICENSE; identifier s.i; expression s.e; @@ MODULE_LICENSE( - i + e ); // </smpl> Signed-off-by: Julia Lawall <Julia.Lawall@lip6.fr> [dtor: added a couple of drivers missed by the script, removed a few unused DRIVER_VERSION macros] Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-01-16Input: remove unneeded MODULE_VERSION() usage in touchscreen driversGreg Kroah-Hartman4-7/+0
MODULE_VERSION is useless for in-kernel drivers, so just remove all usage of it in the touchscreen drivers. Along with this, some DRV_VERSION macros were removed as they are also pointless. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-01-12Input: goodix - disable IRQs while suspendedHans de Goede1-2/+6
We should not try to do any i2c transfers before the controller is resumed (which happens before our resume method gets called). So we need to disable our IRQ while suspended to enforce this. The code paths for devices with GPIOs for the int and reset pins already disable the IRQ the through goodix_free_irq(). This commit also disables the IRQ while suspended for devices without GPIOs for the int and reset pins. This fixes the i2c bus sometimes getting stuck after a suspend/resume causing the touchscreen to sometimes not work after a suspend/resume. This has been tested on a GPD pocked device. BugLink: https://github.com/nexus511/gpd-ubuntu-packages/issues/10 BugLink: https://www.reddit.com/r/GPDPocket/comments/7niut2/fix_for_broken_touch_after_resume_all_linux/ Tested-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Bastien Nocera <hadess@hadess.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-01-09Input: silead - add support for capactive home button found on some x86 tabletsHans de Goede1-11/+35
On some x86 tablets with a silead touchscreen the windows logo on the front is a capacitive home button. Touching this button results in a touch with bits 12-15 of the Y coordinates set, while normally only the lower 12 are used. Detect this and report a KEY_LEFTMETA press when this happens. Note for now we only respond to the Y coordinate bits 12-15 containing 0x01, on some tablets *without* a capacative button I've noticed these bits containing 0x04 when crossing the edges of the screen. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2018-01-05Input: raydium_i2c_ts - include hardware version in firmware nameJeffrey Lin1-2/+12
Add hardware version to the firmware file name to handle scenarios where single system image supports variety of devices. Signed-off-by: Jeffrey Lin <jeffrey.lin@rad-ic.com> Patchwork-Id: 10127677 Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-11-10Input: add support for the Samsung S6SY761 touchscreenAndi Shyti3-0/+571
The S6SY761 touchscreen is a capicitive multi-touch controller for mobile use. It's connected with i2c at the address 0x48. This commit provides a basic version of the driver which can handle only initialization, touch events and power states. The controller is controlled by a firmware which, in the version I currently have, doesn't provide all the possible functionalities mentioned in the datasheet. Signed-off-by: Andi Shyti <andi.shyti@samsung.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-11-10Input: add support for HiDeep touchscreenAnthony Kim3-0/+1132
The HiDeep touchscreen device is a capacitive multi-touch controller mainly for multi-touch supported devices use. It use I2C interface for communication to IC and provide axis X, Y, Z locations for ten finger touch through input event interface to userspace. It support the Crimson and the Lime two type IC. They are different the number of channel supported and FW size. But the working protocol is same. Signed-off-by: Anthony Kim <anthony.kim@hideep.com> Acked-by: Rob Herring <robh+dt@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-11-07Input: st1232 - remove obsolete platform device supportGeert Uytterhoeven1-13/+3
Commit 1fa59bda21c7fa36 ("ARM: shmobile: Remove legacy board code for Armadillo-800 EVA"), removed the last user of st1232_pdata and the "st1232-ts" platform device. All remaining users use DT. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-11-07Merge tag 'v4.14-rc8' into nextDmitry Torokhov3-0/+3
Merge with mainline to bring in SPDX markings to avoid annoying merge problems when some header files get deleted.
2017-11-03Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/inputLinus Torvalds1-0/+1
Pull input fixes from Dmitry Torokhov: "Just a couple of fixups to the sparse-keymap module and the Microchip AR1021 touchscreen driver" * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: sparse-keymap - send sync event for KE_SW/KE_VSW Input: ar1021_i2c - set INPUT_PROP_DIRECT
2017-11-03Input: ar1021_i2c - set INPUT_PROP_DIRECTMartin Kepplinger1-0/+1
If INPUT_PROP_DIRECT is set, userspace doesn't have to fall back to old ways of identifying touchscreen devices. Let's add it. Signed-off-by: Martin Kepplinger <martink@posteo.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-11-03Input: cyttsp4 - avoid overflows when calculating memory sizesVince Kim1-12/+40
There are several places to perform subtraction to calculate buffer size such as: si->si_ofs.cydata_size = si->si_ofs.test_ofs - si->si_ofs.cydata_ofs; ... p = krealloc(si->si_ptrs.cydata, si->si_ofs.cydata_size, GFP_KERNEL); Actually, data types of above variables during subtraction are size_t, so it is unsigned. That means if second operand(si->si_ofs.cydata_ofs) is greater than the first operand(si->si_ofs.test_ofs), then resulting si->si_ofs.cydata_size could result in an unsigned integer wrap which is not desirable. The proper way to correct this problem is to perform a test of both operands to avoid having unsigned wrap. Signed-off-by: Vince Kim <vince.k.kim@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-11-02License cleanup: add SPDX GPL-2.0 license identifier to files with no licenseGreg Kroah-Hartman2-0/+2
Many source files in the tree are missing licensing information, which makes it harder for compliance tools to determine the correct license. By default all files without license information are under the default license of the kernel, which is GPL version 2. Update the files which contain no license information with the 'GPL-2.0' SPDX license identifier. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This patch is based on work done by Thomas Gleixner and Kate Stewart and Philippe Ombredanne. How this work was done: Patches were generated and checked against linux-4.14-rc6 for a subset of the use cases: - file had no licensing information it it. - file was a */uapi/* one with no licensing information in it, - file was a */uapi/* one with existing licensing information, Further patches will be generated in subsequent months to fix up cases where non-standard license headers were used, and references to license had to be inferred by heuristics based on keywords. The analysis to determine which SPDX License Identifier to be applied to a file was done in a spreadsheet of side by side results from of the output of two independent scanners (ScanCode & Windriver) producing SPDX tag:value files created by Philippe Ombredanne. Philippe prepared the base worksheet, and did an initial spot review of a few 1000 files. The 4.13 kernel was the starting point of the analysis with 60,537 files assessed. Kate Stewart did a file by file comparison of the scanner results in the spreadsheet to determine which SPDX license identifier(s) to be applied to the file. She confirmed any determination that was not immediately clear with lawyers working with the Linux Foundation. Criteria used to select files for SPDX license identifier tagging was: - Files considered eligible had to be source code files. - Make and config files were included as candidates if they contained >5 lines of source - File already had some variant of a license header in it (even if <5 lines). All documentation files were explicitly excluded. The following heuristics were used to determine which SPDX license identifiers to apply. - when both scanners couldn't find any license traces, file was considered to have no license information in it, and the top level COPYING file license applied. For non */uapi/* files that summary was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 11139 and resulted in the first patch in this series. If that file was a */uapi/* path one, it was "GPL-2.0 WITH Linux-syscall-note" otherwise it was "GPL-2.0". Results of that was: SPDX license identifier # files ---------------------------------------------------|------- GPL-2.0 WITH Linux-syscall-note 930 and resulted in the second patch in this series. - if a file had some form of licensing information in it, and was one of the */uapi/* ones, it was denoted with the Linux-syscall-note if any GPL family license was found in the file or had no licensing in it (per prior point). Results summary: SPDX license identifier # files ---------------------------------------------------|------ GPL-2.0 WITH Linux-syscall-note 270 GPL-2.0+ WITH Linux-syscall-note 169 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-2-Clause) 21 ((GPL-2.0 WITH Linux-syscall-note) OR BSD-3-Clause) 17 LGPL-2.1+ WITH Linux-syscall-note 15 GPL-1.0+ WITH Linux-syscall-note 14 ((GPL-2.0+ WITH Linux-syscall-note) OR BSD-3-Clause) 5 LGPL-2.0+ WITH Linux-syscall-note 4 LGPL-2.1 WITH Linux-syscall-note 3 ((GPL-2.0 WITH Linux-syscall-note) OR MIT) 3 ((GPL-2.0 WITH Linux-syscall-note) AND MIT) 1 and that resulted in the third patch in this series. - when the two scanners agreed on the detected license(s), that became the concluded license(s). - when there was disagreement between the two scanners (one detected a license but the other didn't, or they both detected different licenses) a manual inspection of the file occurred. - In most cases a manual inspection of the information in the file resulted in a clear resolution of the license that should apply (and which scanner probably needed to revisit its heuristics). - When it was not immediately clear, the license identifier was confirmed with lawyers working with the Linux Foundation. - If there was any question as to the appropriate license identifier, the file was flagged for further research and to be revisited later in time. In total, over 70 hours of logged manual review was done on the spreadsheet to determine the SPDX license identifiers to apply to the source files by Kate, Philippe, Thomas and, in some cases, confirmation by lawyers working with the Linux Foundation. Kate also obtained a third independent scan of the 4.13 code base from FOSSology, and compared selected files where the other two scanners disagreed against that SPDX file, to see if there was new insights. The Windriver scanner is based on an older version of FOSSology in part, so they are related. Thomas did random spot checks in about 500 files from the spreadsheets for the uapi headers and agreed with SPDX license identifier in the files he inspected. For the non-uapi files Thomas did random spot checks in about 15000 files. In initial set of patches against 4.14-rc6, 3 files were found to have copy/paste license identifier errors, and have been fixed to reflect the correct identifier. Additionally Philippe spent 10 hours this week doing a detailed manual inspection and review of the 12,461 patched files from the initial patch version early this week with: - a full scancode scan run, collecting the matched texts, detected license ids and scores - reviewing anything where there was a license detected (about 500+ files) to ensure that the applied SPDX license was correct - reviewing anything where there was no detection but the patch license was not GPL-2.0 WITH Linux-syscall-note to ensure that the applied SPDX license was correct This produced a worksheet with 20 files needing minor correction. This worksheet was then exported into 3 different .csv files for the different types of files to be modified. These .csv files were then reviewed by Greg. Thomas wrote a script to parse the csv files and add the proper SPDX tag to the file, in the format that the file expected. This script was further refined by Greg based on the output to detect more types of files automatically and to distinguish between header and source .c files (which need different comment types.) Finally Greg ran the script using the .csv files to generate the patches. Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org> Reviewed-by: Philippe Ombredanne <pombredanne@nexb.com> Reviewed-by: Thomas Gleixner <tglx@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-27Input: mxs-lradc - remove redundant assignment to pointer inputColin Ian King1-1/+1
The pointer 'input' is being initialized with ts->ts_input and this value is not being read as it is updated a few lines later with the return value from the call to devm_input_allocate_device. Remove the redundant initialization assignment. Cleans up clang warning: drivers/input/touchscreen/mxs-lradc-ts.c:587:20: warning: Value Xi stored to 'input' during its initialization is never read Signed-off-by: Colin Ian King <colin.king@canonical.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-10-25Input: add I2C attached EETI EXC3000 multi touch driverAhmet Inan3-0/+234
The 3000 series have a new protocol which allows to report up to 5 points in a single 66 byte frame. One must always read in 66 byte frames. To support up to 10 points, two consecutive frames need to be read: The first frame says how many points until sync. The second frame must say zero points or both frames must be discarded. To be able to work with the higher 400KHz I2C bus rate, one must successfully send a special package prior _each_ read or the controller will refuse to cooperate. This is a minimal implementation based on egalax_i2c.c (which can be found on the internet) and egalax_ts.c but without the vendor interface and no power management support. Signed-off-by: Ahmet Inan <inan@distec.de> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-10-24Input: goodix - support gt1151 touchpanelMarcin Niestroj1-27/+98
Support was added based on Goodix GitHub repo [1]. There are two major differences between gt1151 and currently supported devices (gt9x): * CONFIG_DATA register has 0x8050 address instead of 0x8047, * config data checksum has 16-bit width instead of 8-bit. Also update goodix_i2c_test() function, so it reads ID register (which has the same address for all devices) instead of CONFIG_DATA (because its address is known only after reading ID of the device). [1] https://github.com/goodix/gt1x_driver_generic Signed-off-by: Marcin Niestroj <m.niestroj@grinn-global.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-10-24Input: touchsceen - convert timers to use timer_setup()Kees Cook5-18/+18
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Kees Cook <keescook@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-10-23Input: ad7877 - convert to using timer_setup()stephen lu1-3/+3
In preparation for unconditionally passing the struct timer_list pointer to all timer callbacks, switch to using the new timer_setup() and from_timer() to pass the timer pointer explicitly. Signed-off-by: Stephen Lu <lumotuwe@gmail.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-10-23Merge tag 'v4.14-rc6' into nextDmitry Torokhov4-29/+48
Merge with mainline to bring in the timer API changes.
2017-10-21Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/inputLinus Torvalds3-28/+47
Pull input fixes from Dmitry Torokhov: - joydev now implements a blacklist to avoid creating joystick nodes for accelerometers found in composite devices such as PlaStation controllers - assorted driver fixes * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/dtor/input: Input: ims-psu - check if CDC union descriptor is sane Input: joydev - blacklist ds3/ds4/udraw motion sensors Input: allow matching device IDs on property bits Input: factor out and export input_device_id matching code Input: goodix - poll the 'buffer status' bit before reading data Input: axp20x-pek - fix module not auto-loading for axp221 pek Input: tca8418 - enable interrupt after it has been requested Input: stmfts - fix setting ABS_MT_POSITION_* maximum size Input: ti_am335x_tsc - fix incorrect step config for 5 wire touchscreen Input: synaptics - disable kernel tracking on SMBus devices
2017-10-19Input: edt-ft5x06 - implement support for the EDT-M12 seriesSimon Budig1-11/+39
This adds support for the EDT M12 series of touchscreens. Signed-off-by: Simon Budig <simon.budig@kernelconcepts.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-10-19Input: edt-ft5x06 - make distinction between m06/m09/generic more clearSimon Budig1-29/+93
Since the driver also is useful for some non-EDT touchscreens based on the focaltec chips introduce the concept of a "generic" focaltec based touch. Use a better heuristics for model detection and be more specific in the source. Signed-off-by: Simon Budig <simon.budig@kernelconcepts.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-10-19Input: goodix - poll the 'buffer status' bit before reading dataPaul Cercueil1-23/+44
The Goodix panel triggers an interrupt on touch events. However, its registers will contain the valid values a short time after the interrupt, and not when it's raised. At that moment, the 'buffer status' bit is set. Previously, if the 'buffer status' bit was not set when the registers were read, the data was discarded and no input event was emitted, causing "finger down" or "finger up" events to be missed sometimes. This went unnoticed until v4.9, as the DesignWare I2C driver commonly used with this driver had enough latency for that bug to never trigger until commit 2702ea7dbec5 ("i2c: designware: wait for disable/enable only if necessary"). Now, in the IRQ handler we will poll (with a timeout) the 'buffer status' bit and process the data of the panel as soon as this bit gets set. Note that the Goodix panel will send a few spurious interrupts after the 'finger up' event, in which the 'buffer status' bit will never be set. Cc: Bastien Nocera <hadess@hadess.net> Cc: russianneuromancer@ya.ru Signed-off-by: Paul Cercueil <paul@crapouillou.net> [hdegoede@redhat.com: Change poll loop to use jiffies, add comment about typical poll time] Signed-off-by: Hans de Goede <hdegoede@redhat.com> [dtor: rearranged control flow a bit to avoid explicit goto and double check] Reviewed-by: Bastien Nocera <hadess@hadess.net> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-10-18Input: stmfts - fix setting ABS_MT_POSITION_* maximum sizeChanwoo Choi1-4/+2
The commit 78bcac7b2ae1e ("Input: add support for the STMicroelectronics FingerTip touchscreen) used the 'touchscreen_parse_properties()' helper function in order to get the value of common properties. But, commit 78bcac7b2ae1e didn't set the capability of ABS_MT_POSITION_* before calling touchscreen_parse_properties(). In result, the max_x and max_y of 'struct touchscreen_properties' were not set. Fixes: 78bcac7b2ae1e ("Input: add support for the STMicroelectronics FingerTip touchscreen") Cc: stable@vger.kernel.org Signed-off-by: Chanwoo Choi <cw00.choi@samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-10-18Input: ti_am335x_tsc - fix incorrect step config for 5 wire touchscreenJeff Lance1-1/+1
Step config setting for 5 wire touchscreen is incorrect for Y coordinates. It was broken while we moved to DT. If you look close at the offending commit bb76dc09ddfc ("input: ti_am33x_tsc: Order of TSC wires, made configurable"), the change was: - STEPCONFIG_XNP | STEPCONFIG_YPN; + ts_dev->bit_xn | ts_dev->bit_yp; while bit_xn = STEPCONFIG_XNN and bit_yp = STEPCONFIG_YNN. Not quite the same. Fixes: bb76dc09ddfc ("input: ti_am33x_tsc: Order of TSC wires, made configurable") Signed-off-by: Jeff Lance <j-lance1@ti.com> [vigneshr@ti.com: Rebase to v4.14-rc1] Signed-off-by: Vignesh R <vigneshr@ti.com> Reviewed-by: Michael Nazzareno Trimarchi <michael@amarulasolutions.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-09-29Input: ad7879 - use managed devm_device_add_groupAndi Shyti1-12/+1
Commit 57b8ff070f98 ("driver core: add devm_device_add_group() and friends") has added the managed version for creating sysfs group files. Use devm_device_add_group instead of sysfs_create_group and remove the action that cleans the sysfs file when exiting the driver. Signed-off-by: Andi Shyti <andi@etezian.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-09-29Input: edt-ft5x06 - use managed devm_device_add_groupAndi Shyti1-7/+2
Commit 57b8ff070f98 ("driver core: add devm_device_add_group() and friends") has added the managed version for creating sysfs group files. Use devm_device_add_group instead of sysfs_create_group and remove the relative sysfs_remove_group and goto label. Signed-off-by: Andi Shyti <andi@etezian.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-09-29Input: wdt87xx_i2c - use managed devm_device_add_groupAndi Shyti1-9/+1
Commit 57b8ff070f98 ("driver core: add devm_device_add_group() and friends") has added the managed version for creating sysfs group files. Use devm_device_add_group instead of sysfs_create_group and remove the relative sysfs_remove_group. Signed-off-by: Andi Shyti <andi@etezian.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-09-29Input: rohm_bu21023 - use managed devm_device_add_groupAndi Shyti1-16/+1
Commit 57b8ff070f98 ("driver core: add devm_device_add_group() and friends") has added the managed version for creating sysfs group files. Use devm_device_add_group instead of sysfs_create_group and remove the action that cleans the sysfs file when exiting the driver. Signed-off-by: Andi Shyti <andi@etezian.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-09-29Input: raydium_i2c_ts - use managed devm_device_add_groupAndi Shyti1-17/+1
Commit 57b8ff070f98 ("driver core: add devm_device_add_group() and friends") has added the managed version for creating sysfs group files. Use devm_device_add_group instead of sysfs_create_group and remove the action that cleans the sysfs file when exiting the driver. Signed-off-by: Andi Shyti <andi@etezian.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-09-29Input: melfas_mip4 - use managed devm_device_add_groupAndi Shyti1-16/+1
Commit 57b8ff070f98 ("driver core: add devm_device_add_group() and friends") has added the managed version for creating sysfs group files. Use devm_device_add_group instead of sysfs_create_group and remove the action that cleans the sysfs file when exiting the driver. Signed-off-by: Andi Shyti <andi@etezian.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-09-29Input: elants_i2c - use managed devm_device_add_groupAndi Shyti1-18/+1
Commit 57b8ff070f98 ("driver core: add devm_device_add_group() and friends") has added the managed version for creating sysfs group files. Use devm_device_add_group instead of sysfs_create_group and remove the action that cleans the sysfs file when exiting the driver. Signed-off-by: Andi Shyti <andi@etezian.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-09-26Input: usbtouchscreen - use EXPERT instead of EMBEDDED for EasyTouchRandy Dunlap1-1/+1
Change control of TOUCHSCREEN_USB_EASYTOUCH prompt string from EMBEDDED to EXPERT to match the rest of this Kconfig file. Signed-off-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
2017-09-22Input: stmfts - use devm_device_add_groupAndi Shyti1-3/+1
instead of sysfs_create_group. Signed-off-by: Andi Shyti <andi.shyti@samsung.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>