summaryrefslogtreecommitdiff
path: root/drivers/input/touchscreen (unfollow)
Commit message (Collapse)Author
2022-07-27gt1151: Properly ifdef all fw update referencesYaroslav Furman
* While Z2 Pro doesn't suffer from touchscreen going bad, it's still kinda pointless to have all that unused code and proc entries that it creates. Signed-off-by: Yaroslav Furman <yaro330@gmail.com> Signed-off-by: Davide Garberi <dade.garberi@gmail.com>
2022-07-27gt1151: gt1x_generic: update guitar reset functionYaroslav Furman
Our touchscreen only worked fine with HZ 100, before this. Code taken from: [1] and cleaned up. [1]: https://github.com/goodix/gt1x_driver_generic/blob/master/gt1x_generic.c#L884 Signed-off-by: Yaroslav Furman <yaro330@gmail.com> Signed-off-by: Davide Garberi <dade.garberi@gmail.com>
2022-07-27gt1151: Clean indentationDavide Garberi
Signed-off-by: Davide Garberi <dade.garberi@gmail.com>
2022-07-27gt9x_2.4: Don't return error when fw check failsYaroslav Furman
* It is broken in some refurbished devices after k4.4 upgrade, but touchscreen works fine so why even bother.. Change-Id: I167be7b1c282d5f3c90db0a131206b443da3a170
2022-07-27gt9x_2.4: Fix touchscreen not working in AROMA and MultiROM BootUIFedor917
Signed-off-by: dd3boh <dade.garberi@gmail.com> Signed-off-by: Davide Garberi <dade.garberi@gmail.com>
2022-07-27gt9x_2.4: Fix proximity check over dt2wdavidevinavil
Change-Id: I988c25b85dca381b73fb47b06276bc7fa1ad8772 Signed-off-by: Davide Garberi <dade.garberi@gmail.com>
2022-07-27drivers: input: Import touchscreen changes from ZUKFaiz Authar
Change-Id: I8a424d880cd6569c67d0fa836291fa1310ad85e7 Signed-off-by: Davide Garberi <dade.garberi@gmail.com>
2021-12-22Input: touchscreen - avoid bitwise vs logical OR warningNathan Chancellor
commit a02dcde595f7cbd240ccd64de96034ad91cffc40 upstream. A new warning in clang points out a few places in this driver where a bitwise OR is being used with boolean types: drivers/input/touchscreen.c:81:17: warning: use of bitwise '|' with boolean operands [-Wbitwise-instead-of-logical] data_present = touchscreen_get_prop_u32(dev, "touchscreen-min-x", ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ This use of a bitwise OR is intentional, as bitwise operations do not short circuit, which allows all the calls to touchscreen_get_prop_u32() to happen so that the last parameter is initialized while coalescing the results of the calls to make a decision after they are all evaluated. To make this clearer to the compiler, use the '|=' operator to assign the result of each touchscreen_get_prop_u32() call to data_present, which keeps the meaning of the code the same but makes it obvious that every one of these calls is expected to happen. Signed-off-by: Nathan Chancellor <nathan@kernel.org> Reported-by: Nick Desaulniers <ndesaulniers@google.com> Reviewed-by: Nick Desaulniers <ndesaulniers@google.com> Link: https://lore.kernel.org/r/20211014205757.3474635-1-nathan@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Anders Roxell <anders.roxell@linaro.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-07-20Input: usbtouchscreen - fix control-request directionsJohan Hovold
commit 41e81022a04a0294c55cfa7e366bc14b9634c66e upstream. The direction of the pipe argument must match the request-type direction bit or control requests may fail depending on the host-controller-driver implementation. Fix the four control requests which erroneously used usb_rcvctrlpipe(). Fixes: 1d3e20236d7a ("[PATCH] USB: usbtouchscreen: unified USB touchscreen driver") Fixes: 24ced062a296 ("usbtouchscreen: add support for DMC TSC-10/25 devices") Fixes: 9e3b25837a20 ("Input: usbtouchscreen - add support for e2i touchscreen controller") Signed-off-by: Johan Hovold <johan@kernel.org> Cc: stable@vger.kernel.org # 2.6.17 Link: https://lore.kernel.org/r/20210524092048.4443-1-johan@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-03Input: elo - fix an error code in elo_connect()Dan Carpenter
[ Upstream commit 0958351e93fa0ac142f6dd8bd844441594f30a57 ] If elo_setup_10() fails then this should return an error code instead of success. Fixes: fae3006e4b42 ("Input: elo - add support for non-pressure-sensitive touchscreens") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/YBKFd5CvDu+jVmfW@mwanda Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-12-29Input: goodix - add upside-down quirk for Teclast X98 Pro tabletSimon Beginn
[ Upstream commit cffdd6d90482316e18d686060a4397902ea04bd2 ] The touchscreen on the Teclast x98 Pro is also mounted upside-down in relation to the display orientation. Signed-off-by: Simon Beginn <linux@simonmicro.de> Signed-off-by: Bastien Nocera <hadess@hadess.net> Link: https://lore.kernel.org/r/20201117004253.27A5A27EFD@localhost Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-12-29Input: ads7846 - fix unaligned access on 7845Dmitry Torokhov
[ Upstream commit 03e2c9c782f721b661a0e42b1b58f394b5298544 ] req->sample[1] is not naturally aligned at word boundary, and therefore we should use get_unaligned_be16() when accessing it. Fixes: 3eac5c7e44f3 ("Input: ads7846 - extend the driver for ads7845 controller support") Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-12-29Input: ads7846 - fix integer overflow on Rt calculationOleksij Rempel
[ Upstream commit 820830ec918f6c3dcd77a54a1c6198ab57407916 ] In some rare cases the 32 bit Rt value will overflow if z2 and x is max, z1 is minimal value and x_plate_ohms is relatively high (for example 800 ohm). This would happen on some screen age with low pressure. There are two possible fixes: - make Rt 64bit - reorder calculation to avoid overflow The second variant seems to be preferable, since 64 bit calculation on 32 bit system is a bit more expensive. Fixes: ffa458c1bd9b6f653008d450f337602f3d52a646 ("spi: ads7846 driver") Co-developed-by: David Jander <david@protonic.nl> Signed-off-by: David Jander <david@protonic.nl> Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de> Link: https://lore.kernel.org/r/20201113112240.1360-1-o.rempel@pengutronix.de Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-10-29Input: imx6ul_tsc - clean up some errors in imx6ul_tsc_resume()Dan Carpenter
[ Upstream commit 30df23c5ecdfb8da5b0bc17ceef67eff9e1b0957 ] If imx6ul_tsc_init() fails then we need to clean up the clocks. I reversed the "if (input_dev->users) {" condition to make the code a bit simpler. Fixes: 6cc527b05847 ("Input: imx6ul_tsc - propagate the errors") Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20200905124942.GC183976@mwanda Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-07-23Revert "input: touchscreen: st: Fix logical '&&' with constant operand warning"Michael Bestas
* We'll take the upstream fix This reverts commit d1a513b1cb96f5dd99e803c521260354feaddc9d. Change-Id: Ie241fdc188d2d496a862c845165c4ce7e51ffcec
2020-07-23Revert "input: touchscren: st: Remove unnecessary parentheses"Michael Bestas
* We'll take the upstream fix This reverts commit 469a6a56f4dd2a16bc3cad3072250e806b705156. Change-Id: I8ad15bebff59d74eb9434585156f76814d6c47d8
2020-06-08msm: Fix compilation errorSwetha Chikkaboraiah
Fix the below error with clang warning: address of array 'data->cfg_name' will always evaluate to 'true' [-Wpointer-bool-conversion]. Change-Id: I9a28d1a6a315ccbb93a17c247381c5ec56c92806 Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
2020-06-03Input: usbtouchscreen - add support for BonXeon TPJames Hilliard
[ Upstream commit e3b4f94ef52ae1592cbe199bd38dbdc0d58b2217 ] Based on available information this uses the singletouch irtouch protocol. This is tested and confirmed to be fully functional on the BonXeon TP hardware I have. Signed-off-by: James Hilliard <james.hilliard1@gmail.com> Link: https://lore.kernel.org/r/20200413184217.55700-1-james.hilliard1@gmail.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-05-16input: touchpanel: Fix compilation errors with clangSwetha Chikkaboraiah
This patch intends to fix compilation errors while building kernel with LLVM toolchain. Change-Id: I8d1f9dd6a5e52a6a63cc142ae33d4bb671308712 Signed-off-by: Swetha Chikkaboraiah <schikk@codeaurora.org>
2020-05-10Input: edt-ft5x06 - fix setting gain, offset, and threshold via device treePhilipp Zabel
commit dc262dfaaeda7617ae0b15b5ce1252a6cd102b19 upstream. A recent patch broke parsing the gain, offset, and threshold parameters from device tree. Instead of setting the cached values and writing them to the correct registers during probe, it would write the values from DT into the register address variables and never write them to the chip during normal operation. Fixes: 2e23b7a96372 ("Input: edt-ft5x06 - use generic properties API") Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-02-28Input: edt-ft5x06 - work around first register access errorPhilipp Zabel
[ Upstream commit e112324cc0422c046f1cf54c56f333d34fa20885 ] The EP0700MLP1 returns bogus data on the first register read access (reading the threshold parameter from register 0x00): edt_ft5x06 2-0038: crc error: 0xfc expected, got 0x40 It ignores writes until then. This patch adds a dummy read after which the number of sensors and parameter read/writes work correctly. Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de> Signed-off-by: Marco Felsch <m.felsch@pengutronix.de> Tested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-02-02input: touchscren: st: Remove unnecessary parenthesesNathan Chancellor
Clang warns: ../drivers/input/touchscreen/st/fts_gui.c:61:10: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((i == 0)) { ~~^~~~ ../drivers/input/touchscreen/st/fts_gui.c:61:10: note: remove extraneous parentheses around the comparison to silence this warning if ((i == 0)) { ~ ^ ~ ../drivers/input/touchscreen/st/fts_gui.c:61:10: note: use '=' to turn this equality comparison into an assignment if ((i == 0)) { ^~ = ../drivers/input/touchscreen/st/fts_gui.c:128:10: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((i == 0)) { ~~^~~~ ../drivers/input/touchscreen/st/fts_gui.c:128:10: note: remove extraneous parentheses around the comparison to silence this warning if ((i == 0)) { ~ ^ ~ ../drivers/input/touchscreen/st/fts_gui.c:128:10: note: use '=' to turn this equality comparison into an assignment if ((i == 0)) { ^~ = ../drivers/input/touchscreen/st/fts_gui.c:176:10: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((i == 0)) { ~~^~~~ ../drivers/input/touchscreen/st/fts_gui.c:176:10: note: remove extraneous parentheses around the comparison to silence this warning if ((i == 0)) { ~ ^ ~ ../drivers/input/touchscreen/st/fts_gui.c:176:10: note: use '=' to turn this equality comparison into an assignment if ((i == 0)) { ^~ = ../drivers/input/touchscreen/st/fts_gui.c:244:10: warning: equality comparison with extraneous parentheses [-Wparentheses-equality] if ((i == 0)) { ~~^~~~ ../drivers/input/touchscreen/st/fts_gui.c:244:10: note: remove extraneous parentheses around the comparison to silence this warning if ((i == 0)) { ~ ^ ~ ../drivers/input/touchscreen/st/fts_gui.c:244:10: note: use '=' to turn this equality comparison into an assignment if ((i == 0)) { ^~ = 4 warnings generated. Fixes: ed29ea5a01b9 ("input: touchpanel: Add ST Touchscreen version 4.1.0 driver") Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
2020-02-02input: touchscreen: st: Fix logical '&&' with constant operand warningNathan Chancellor
Clang warns: ../drivers/input/touchscreen/st/fts_lib/ftsGesture.c:337:165: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand] ../drivers/input/touchscreen/st/fts_lib/ftsGesture.c:367:132: warning: use of logical '&&' with constant operand [-Wconstant-logical-operand] Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
2020-02-02input: touchscreen: st: Don't redefine u8, u16, and u32Nathan Chancellor
Clang warns a lot in this driver along the lines of: In file included from ../drivers/input/touchscreen/st/fts_lib/ftsGesture.c:19: In file included from ../drivers/input/touchscreen/st/fts_lib/ftsIO.h:17: In file included from ../drivers/input/touchscreen/st/fts_lib/ftsCrossCompile.h:4: In file included from ../include/linux/init.h:4: In file included from ../include/linux/compiler.h:220: In file included from ../include/uapi/linux/types.h:4: In file included from arch/arm64/include/generated/asm/types.h:1: In file included from ../include/uapi/asm-generic/types.h:6: ../include/asm-generic/int-ll64.h:16:23: warning: redefinition of typedef 'u8' is a C11 feature [-Wtypedef-redefinition] typedef unsigned char u8; ^ ../drivers/input/touchscreen/st/fts_lib/ftsSoftware.h:18:23: note: previous definition is here typedef unsigned char u8; ^ Fixes: ed29ea5a01b9 ("input: touchpanel: Add ST Touchscreen version 4.1.0 driver") Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
2020-02-02input: atmel_maxtouch_ts: Remove pointless NULL check in mxt_load_cfgNathan Chancellor
Clang warns: ../drivers/input/touchscreen/atmel_maxtouch_ts.c:1864:13: warning: address of array 'data->cfg_name' will always evaluate to 'true' [-Wpointer-bool-conversion] if (!data->cfg_name) { ~~~~~~~^~~~~~~~ 1 warning generated. Fixes: ea2cf49df906 ("input: atmel_maxtouch_ts: Add latest Atmel driver support") Signed-off-by: Nathan Chancellor <natechancellor@gmail.com>
2020-01-29Input: sur40 - fix interface sanity checksJohan Hovold
commit 6b32391ed675827f8425a414abbc6fbd54ea54fe upstream. Make sure to use the current alternate setting when verifying the interface descriptors to avoid binding to an invalid interface. This in turn could cause the driver to misbehave or trigger a WARN() in usb_submit_urb() that kernels with panic_on_warn set would choke on. Fixes: bdb5c57f209c ("Input: add sur40 driver for Samsung SUR40 (aka MS Surface 2.0/Pixelsense)") Signed-off-by: Johan Hovold <johan@kernel.org> Acked-by: Vladis Dronov <vdronov@redhat.com> Link: https://lore.kernel.org/r/20191210113737.4016-8-johan@kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-01-04Input: atmel_mxt_ts - disable IRQ across suspendEvan Green
[ Upstream commit 463fa44eec2fef50d111ed0199cf593235065c04 ] Across suspend and resume, we are seeing error messages like the following: atmel_mxt_ts i2c-PRP0001:00: __mxt_read_reg: i2c transfer failed (-121) atmel_mxt_ts i2c-PRP0001:00: Failed to read T44 and T5 (-121) This occurs because the driver leaves its IRQ enabled. Upon resume, there is an IRQ pending, but the interrupt is serviced before both the driver and the underlying I2C bus have been resumed. This causes EREMOTEIO errors. Disable the IRQ in suspend, and re-enable it on resume. If there are cases where the driver enters suspend with interrupts disabled, that's a bug we should fix separately. Signed-off-by: Evan Green <evgreen@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-12-21Input: goodix - add upside-down quirk for Teclast X89 tabletHans de Goede
commit df5b5e555b356662a5e4a23c6774fdfce8547d54 upstream. The touchscreen on the Teclast X89 is mounted upside down in relation to the display orientation (the touchscreen itself is mounted upright, but the display is mounted upside-down). Add a quirk for this so that we send coordinates which match the display orientation. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Bastien Nocera <hadess@hadess.net> Link: https://lore.kernel.org/r/20191202085636.6650-1-hdegoede@redhat.com Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-12-21Input: cyttsp4_core - fix use after free bugPan Bian
[ Upstream commit 79aae6acbef16f720a7949f8fc6ac69816c79d62 ] The device md->input is used after it is released. Setting the device data to NULL is unnecessary as the device is never used again. Instead, md->input should be assigned NULL to avoid accessing the freed memory accidently. Besides, checking md->si against NULL is superfluous as it points to a variable address, which cannot be NULL. Signed-off-by: Pan Bian <bianpan2016@163.com> Link: https://lore.kernel.org/r/1572936379-6423-1-git-send-email-bianpan2016@163.com Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-11-25Input: st1232 - set INPUT_PROP_DIRECT propertyMartin Kepplinger
[ Upstream commit 20bbb312079494a406c10c90932e3c80837c9d94 ] This is how userspace checks for touchscreen devices most reliably. Signed-off-by: Martin Kepplinger <martink@posteo.de> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
2018-09-19Input: atmel_mxt_ts - only use first T9 instanceNick Dyer
[ Upstream commit 36f5d9ef26e52edff046b4b097855db89bf0cd4a ] The driver only registers one input device, which uses the screen parameters from the first T9 instance. The first T63 instance also uses those parameters. It is incorrect to send input reports from the second instances of these objects if they are enabled: the input scaling will be wrong and the positions will be mashed together. This also causes problems on Android if the number of slots exceeds 32. In the future, this could be handled by looking for enabled touch object instances and creating an input device for each one. Signed-off-by: Nick Dyer <nick.dyer@itdev.co.uk> Acked-by: Benson Leung <bleung@chromium.org> Acked-by: Yufeng Shen <miletus@chromium.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-06-16Input: goodix - add new ACPI id for GPD Win 2 touch screenEthan Lee
commit 5ca4d1ae9bad0f59bd6f851c39b19f5366953666 upstream. GPD Win 2 Website: http://www.gpd.hk/gpdwin2.asp Tested on a unit from the first production run sent to Indiegogo backers Signed-off-by: Ethan Lee <flibitijibibo@gmail.com> Cc: stable@vger.kernel.org Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-16Input: atmel_mxt_ts - add touchpad button mapping for Samsung Chromebook ProVittorio Gambaletta (VittGam)
commit f372b81101e6895252298e563d634d5e44ae81e7 upstream. This patch adds the correct platform data information for the Caroline Chromebook, so that the mouse button does not get stuck in pressed state after the first click. The Samus button keymap and platform data definition are the correct ones for Caroline, so they have been reused here. Signed-off-by: Vittorio Gambaletta <linuxbugs@vittgam.net> Signed-off-by: Salvatore Bellizzi <lkml@seppia.net> Tested-by: Guenter Roeck <groeck@chromium.org> Cc: stable@vger.kernel.org [dtor: adjusted vendor spelling to match shipping firmware] Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-05-01input: touchscreen: synaptics_dsx: Fix buffer overflowVenkata Prahlad Valluru
Limit the index to buffer length while copying from 'strptr' to 'firmware_id'. Change-Id: I1d7cb7a3d9593ca213c7f7341776632e635eb0df Signed-off-by: Venkata Prahlad Valluru <vvalluru@codeaurora.org>
2018-04-03input: touchscreen: Fix uninitialized variable usage in Atmel driverVenkata Prahlad Valluru
Initialize variables that are passed by reference, so that they can be used safely afterwards, irrespective of the called function actions. Change-Id: Ib7fa26b0682c719cabdb9cb94f206a93e3eaaf63 Signed-off-by: Venkata Prahlad Valluru <vvalluru@codeaurora.org>
2018-03-24Input: ar1021_i2c - fix too long name in driver's device tableDmitry Torokhov
[ Upstream commit 95123fc43560d6f4a60e74f72836e63cd8848f76 ] The name field in structure i2c_device_id is 20 characters, and we expect it to be NULL-terminated, however we are trying to stuff it with 21 bytes and thus NULL-terminator is lost. This causes issues when one creates device with name "MICROCHIP_AR1021_I2C" as i2c core cuts off the last "C", and automatic module loading by alias does not work as result. The -I2C suffix in the device name is superfluous, we know what bus we are dealing with, so let's drop it. Also, no other driver uses capitals, and the manufacturer name is normally not included, except in very rare cases of incompatible name collisions. Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=116211 Fixes: dd4cae8bf166 ("Input: Add Microchip AR1021 i2c touchscreen") Reviewed-By: Christian Gmeiner <christian.gmeiner@gmail.com> Tested-by: Martin Kepplinger <martin.kepplinger@ginzinger.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-22Input: tsc2007 - check for presence and power down tsc2007 during probeH. Nikolaus Schaller
[ Upstream commit 934df23171e7c5b71d937104d4957891c39748ff ] 1. check if chip is really present and don't succeed if it isn't. 2. if it succeeds, power down the chip until accessed Signed-off-by: H. Nikolaus Schaller <hns@goldelico.com> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Sasha Levin <alexander.levin@microsoft.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2018-03-13input: touchscreen: Fix uninitialized variable usage in Atmel driverVenkata Prahlad Valluru
Initialize variables that are passed by reference, so that they can be used safely afterwards, irrespective of the called function actions. Change-Id: Ib52c1cbc621913b21eb9520d305327ff5fd154fe Signed-off-by: Venkata Prahlad Valluru <vvalluru@codeaurora.org>
2018-03-13input: touchscreen: Fix error code in Atmel driverVenkata Prahlad Valluru
Set the error code to be returned in case of failure. Change-Id: I2cd818b21decb659de74fde1ac5c667d8606420e Signed-off-by: Venkata Prahlad Valluru <vvalluru@codeaurora.org>
2018-03-14input: touchscreen: Handle failure case in Atmel driverVenkata Prahlad Valluru
Handle file already exists and failure case separately. Change-Id: I0c8004c88feb323b592ad8f622f86fe66cb63006 Signed-off-by: Venkata Prahlad Valluru <vvalluru@codeaurora.org>
2018-03-13input: touchscreen: synaptics_dsx: Fix uninitialized variable usageVenkata Prahlad Valluru
Initialize variables that are passed by reference, so that they can be used safely afterwards, irrespective of the called function actions. Change-Id: Ib95f3aa3077d6ef7aaaabcfc6c882790b6406793 Signed-off-by: Venkata Prahlad Valluru <vvalluru@codeaurora.org>
2018-03-13input: touchscreen: synaptics_dsx: Handle failure case during probeVenkata Prahlad Valluru
Handle create_singlethread_workqueue api failure case. Change-Id: Ic3f45fddfbd40d8a78dd888eed5f01120809adee Signed-off-by: Venkata Prahlad Valluru <vvalluru@codeaurora.org>
2018-01-23Input: 88pm860x-ts - fix child-node lookupJohan Hovold
commit 906bf7daa0618d0ef39f4872ca42218c29a3631f upstream. Fix child node-lookup during probe, which ended up searching the whole device tree depth-first starting at parent rather than just matching on its children. To make things worse, the parent node was prematurely freed, while the child node was leaked. Fixes: 2e57d56747e6 ("mfd: 88pm860x: Device tree support") Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-10-11input: touchpanel: fix TP frozen when ST's TP firstly probe upJin Fu
Set TP to display-unblank status when firstly probe up, so that TP can detect interrupt and report touch event without press power key. Change-Id: I6e4ea48551463c6d0f747987d7c255987e3a11df Signed-off-by: Jin Fu <jinf@codeaurora.org>
2017-08-01input: touchpanel: fix wastes of time when resume and probe for ST's TPJin Fu
Remove a useless system reset, reduce the fts_status_event_handler's print level and modify a error at parsing reset pin to fix the long time resume problem. Besides, remove the needless auto-apdate-FW func when probe to speed up TP's probe process. Change-Id: I1c68fa7add65106d7efcf87b9002363a9242b2f7 Signed-off-by: Jin Fu <jinf@codeaurora.org>
2017-07-17input: synaptics_dsx: validate bounds of intr_reg_numAndrew Chant
Validate the intr_reg_num value returned by touchscreen to ensure no out of bounds access can occur. Bug: 35472278 Change-Id: I22f5b67815fe7d448b5ed847e4e3d65af63bed84 Signed-off-by: Andrew Chant <achant@google.com> Git-repo: https://android.googlesource.com/kernel/msm Git-commit: 271baca849983ef309e82a4e5953027790f36154 Signed-off-by: Dennis Cagle <dcagle@codeaurora.org> Signed-off-by: Shantanu Jain <shjain@qti.qualcomm.com>
2017-06-22input: synaptics_dsx: validate bounds of intr_reg_numAndrew Chant
Validate the intr_reg_num value returned by touchscreen to ensure no out of bounds access can occur. Bug: 35472278 Change-Id: I22f5b67815fe7d448b5ed847e4e3d65af63bed84 Signed-off-by: Andrew Chant <achant@google.com> Git-repo: https://android.googlesource.com/kernel/msm Git-commit: 271baca849983ef309e82a4e5953027790f36154 Signed-off-by: Dennis Cagle <dcagle@codeaurora.org> Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2017-05-22input: synaptics_dsx: remove unused synaptics touch screen driver filesShantanu Jain
Remove unused Synaptics DSX touch screen driver files as these are not used in any of the latest targets. Change-Id: I0cc19825691c92fee1c5b71ff7e9e7a6253f6afe Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2017-05-16input: synaptics_dsx: fix mutex initMohan Pallaka
Initialize mutex before using in irq handler. CRs-fixed: 2047720 Change-Id: I5ebfbc22f2a64dde239fcbb13eb26be50543b484 Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
2017-05-05input: touchscreen: fix issues related to variable initializationShantanu Jain
Fix issues related to variable initialization in FTS touchscreen driver. Change-Id: I2911787dd1e1979e027bacdd1bc1cec06845ffd3 Signed-off-by: Shantanu Jain <shjain@codeaurora.org>