Commit Graph
943 Commits
Author SHA1 Message Date
Vevek Venkatesan eebc5790a6 input: touchscreen: gt9xx: fix memory corruption in Goodix driver
Fix memory corruption in Goodix touchscreen driver, by resetting
the global structure cmd_head to zero (except *data and wr flag)
in goodix_tool_write handler on error case.

CAF-Change-Id: I4f7f8f464b93571627b922b10c10a65826228e42
Signed-off-by: Vevek Venkatesan <vevekv@codeaurora.org>
CVE-2017-0622

Change-Id: I19c78864f8734b68bc6ae1de3e4853de624c7c03
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
2019-08-06 12:26:27 +02:00
Kevin F. Haggerty 238a0fb5ad Merge tag 'v3.4.113' into lineage-16.0
This is the 3.4.113 stable release

Change-Id: I80791430656359c5447a675cbff4431362d18df0
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
2019-08-05 14:20:47 +02:00
Francescodario Cuzzocrea e20e6a0613 Merge tag 'LA.BF.1.1.3-02310-8x26.0' into lineage-16.0 2019-08-05 11:18:51 +02:00
ninez 38f1006d11 misc: Fix system_rev type mismatch
* Samsung sources have type mismatches in 3 of their drivers. This was
  uncovered using linaro's toolchain for kernel compilation.

Change-Id: If3a083ffcb2a15185ff208b22976509ffd8af5e8
Signed-off-by: Kevin F. Haggerty <haggertk@lineageos.org>
2019-08-05 09:13:25 +02:00
Robert Rozic e8357f64b9 touchscreen: mms114: Fix build when DVFS is disabled
Signed-off-by: Robert Rozic <r.rozic97@gmail.com>
2019-08-03 12:23:57 +02:00
xXPR0T0TYPEXx a3a97f9639 drivers: input: touchscreen: cyttsp4: resolved missing separator on
makefile
2019-08-03 12:21:20 +02:00
Francescodario Cuzzocrea 85baa390bf misc: Import SM-G900H kernel source code
* Samsung Package Version: G800HXXU1CRJ1
    * CAF Tag: LA.BF.1.1.3-00110-8x26.0
2019-08-02 15:14:10 +02:00
Andrew Chant 55158d2c50 Input: synaptics: check input, prevent sysfs races
concurrent sysfs calls on the fw updater can cause
ugly race conditions.  Return EBUSY on concurrent sysfs calls.

For sysfs calls which generate deferred work, prevent
the deferred work from running concurrently with other
sysfs calls.

Also check that ext_data_source is appropriately sized
and allocated, based on a patch by
Gengjia Chen (chengjia4574@gmail.com).

Signed-off-by: Andrew Chant <achant@google.com>
Change-Id:I5bbe4992f3fd2d23db288296eaeb61f5831098e9
Bug: 30799828
Bug: 31252388
Git-repo: https://android.googlesource.com/kernel/msm.git
Git-commit: 287ce2ccfefe68067c1f9f5175b6664bf7397fe6
Signed-off-by: Srinivasa Rao Kuppala <srkupp@codeaurora.org>
2016-12-20 15:06:25 +05:30
chengengjia 6192d9c11e input: synaptics: Add checks of user input data
Add checks of the user input count to avoid possible heap overflow

Bug: 30799828
Change-Id: I896492b18c4ace6565fb9edd5cbf51f363ce157b
Signed-off-by: chengengjia <chengjia4574@gmail.com>
Signed-off-by: Andrew Chant <achant@google.com>
Git-repo: https://android.googlesource.com/kernel/msm.git
Git-commit: f549796fb9da58586c5cfc31d07b243c87dcfbd5
Signed-off-by: Dennis Cagle <d-cagle@codeaurora.org>
2016-11-29 03:25:40 -08:00
Mao Li 8ee872fd14 input: touchscreen: change linking order of synaptics_i2c_rmi4
On some hardware when synaptics_rmi4_detection_work() is called,
exp_fn_list is still empty because module_init of synaptics_fw_update
is called later. As a result of this sysfs files required for firmware
update are not created. This patch changes the link order to ensure
that exp_fn_list is properly initialized before
synaptics_rmi4_detection_work() is called when all Synaptics modules
i.e. synaptics_fw_update, synaptics_rmi_dev and synaptics_i2c_rmi4 are
statically linked into the kernel.

CRs-fixed: 634135
Change-Id: Ib0b8e82ed569ecb18788b8aec6e1c9771e74fd2d
Signed-off-by: maol <maol@codeaurora.org>
2014-04-07 14:04:42 +05:30
Linux Build Service Account 164f4b8f32 Merge "input: touchscreen: change the focaltech firmware upgrade method" 2014-03-28 08:18:35 -07:00
Sarada Prasanna Garnayak 7674c5911b input: touchscreen: change the focaltech firmware upgrade method
Upgarde firmware on the touch controller when the new firmware
version is geater than the current firmware version. Update the
version id after successful firmware update. skip firmware
update process when device is in suspend state.

CRs-Fixed: 623803
Change-Id: Ic462f6483887a3654665852e58ae9891de9f5eff
Signed-off-by: Sarada Prasanna Garnayak <c_sgarna@codeaurora.org>
2014-03-25 11:46:33 +05:30
Keith Fallows f0655aa6ee input: atmel_mxt_ts: Synchronous PM request starting Secure Touch
Maintain I2C adapter clocks on when starting Secure Touch
using the synchronous version of pm_runtime_get.

Change-Id: Ie30ea56af9e045239099652124740565428518f8
Acked-by: Christian Bolis <cbolis@qti.qualcomm.com>
Signed-off-by: Keith Fallows <keithf@codeaurora.org>
2014-03-20 10:13:33 +00:00
Shantanu Jain 76c037f49b input: touchscreen: Replace macros used inside the functions
Replace the macros that are used inside the driver function
with dtsi entries.
Remove hrtimer calls which is not being used in the current
driver code.

Change-Id: I29b9ea41df467d0092be8005733016843dc26f60
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2014-02-06 19:37:39 +05:30
Linux Build Service Account 0b4e92519e Merge "input: touchscreen: Add force fw_update support via sysfs entry" 2014-02-04 03:44:20 -08:00
Linux Build Service Account 51474dd1b1 Merge "input: synaptics_fw_update: fix insufficient bounds checking" 2014-01-30 03:55:35 -08:00
Shantanu Jain 3720edea7a input: touchscreen: Add force fw_update support via sysfs entry
Add sysfs entry for force fw_update support in Goodix
driver.
Change the usage of kstrtoul to sscanf in driver to avoid
portability issues.

CRs-fixed: 579806
Change-Id: I147a3e465170dda7af415ade29c04257d9b11a6b
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2014-01-29 17:34:38 +05:30
Abinaya P 3a59368aee input: synaptics_i2c_rmi4: Reorganize the code
Reorganize the code related to debugfs that allows driver to compile
for different build environments. Remove dead code and also define
dummy functions that are needed when CONFIG_PM is not enabled in defconfig.

Change-Id: I385d194c7463cd06322f1b5124f1dc0ce72fc8a1
Signed-off-by: Abinaya P <abinayap@codeaurora.org>
2014-01-27 18:05:40 +05:30
Abinaya P 9642997b70 input: synaptics_fw_update: fix insufficient bounds checking
Possible values of config_area are between 0 and 3. The patch
adds bounds checking in fwu_sysfs_config_area_store() function.
Also use kstrtou16() for parsing the config_area.

Change-Id: Ia0b58f1b5a359c67f420012876431dac920ecfbd
Signed-off-by: Abinaya P <abinayap@codeaurora.org>
2014-01-27 17:42:37 +05:30
Linux Build Service Account c94baa834f Merge "input: touchscreen: Add firmware upgrade via sysfs entry" 2014-01-25 16:27:17 -08:00
Linux Build Service Account 9110801293 Merge "input: touchscreen: Add debufs entries for GTP controller" 2014-01-24 21:12:18 -08:00
Shantanu Jain 2309496836 input: touchscreen: Add firmware upgrade via sysfs entry
Add sysfs entry for firmware upgrade support in Goodix
driver.

CRs-fixed: 575618
Change-Id: If71d4020223547e0db425c9fd37819c6166efcab
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2014-01-24 19:01:52 +05:30
Shantanu Jain 358e4d08a9 input: touchscreen: Add debufs entries for GTP controller
Add debugfs entries for address and data to read the registers
of Goodix controller.

Change-Id: I6543d523e39771615d0e1b684780141e108a2aa4
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2014-01-23 19:56:48 +05:30
Himanshu Aggarwal 27f7356fc4 input: synaptics_fw_update: fix print statements
%zu is the correct printk format specifier when printing size_t types.

Update printks to use %zu for size_t type variables.

Change-Id: Ie556fd14293ecd36143353e575fd5ef22fab20f7
Signed-off-by: Himanshu Aggarwal <haggarwa@codeaurora.org>
2014-01-21 17:07:46 -08:00
Amy Maloche 0e854fb46a input: atmel_mxt_ts: Allow driver to compile in all scenarios
Driver needs dummy functions defined for cases when CONFIG_PM
is not enabled.

Change-Id: I4e9f0885eb9f7a45589b2362e468335a3ca57cba
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
2014-01-20 15:46:50 -08:00
Himanshu Aggarwal c03bab16c8 input: touchscreen: Remove redundant code from Goodix driver
Remove code that reads firmware from the header file, since
we don't plan to support this feature.

CRs-fixed: 591376
Change-Id: I6c18e153ddf18667ca83d47df20c71bce6dbfa21
Signed-off-by: Himanshu Aggarwal <haggarwa@codeaurora.org>
2014-01-15 16:18:28 +05:30
Chun Zhang 7ba20f3209 input: atmel_mxt_ts: amend finger status check
Touch screen driver checks finger status when releasing unwanted touch
events. Current status check does not cover an unwanted finger status.
This introduces extraneous events when device goes to suspend.

CRs-Fixed: 595019
Change-Id: I3c230cb98d5866edf2bc2f433765f787e518ac93
Signed-off-by: Chun Zhang <chunz@codeaurora.org>
2014-01-14 02:46:42 -08:00
Linux Build Service Account 8e94bcc00f Merge "input: touchscreen: Remove irq polling from Goodix driver" 2014-01-08 18:30:43 -08:00
Linux Build Service Account 92d3ed0de9 Merge "input: touchscreen: Add debugfs support for suspend/resume." 2014-01-08 18:30:42 -08:00
Linux Build Service Account 62968f71b7 Merge "input: touchscreen: Code clean-up for Goodix driver" 2014-01-08 15:58:35 -08:00
Linux Build Service Account 7f8bb46eeb Merge "input: touchscreen: Replace Kernel thread with a workqueue" 2014-01-08 15:58:35 -08:00
Linux Build Service Account b09f969cec Merge "input: touchscreen: Add virtual key support from dtsi" 2014-01-08 15:58:34 -08:00
Linux Build Service Account c82bcf68e9 Merge "input: touchscreen: Remove improper debug code" 2014-01-08 15:58:33 -08:00
Linux Build Service Account e439b8a6d7 Merge "input: touchscreen: Add devm_kzalloc calls to goodix driver" 2014-01-08 15:58:32 -08:00
Linux Build Service Account f44e9354fb Merge "input: touchscreen: Clean initialising linux kernel code" 2014-01-08 15:58:32 -08:00
Linux Build Service Account 52e33a5e24 Merge "input: touchscreen: Use macros for magic numbers in Goodix drivers" 2014-01-08 15:58:31 -08:00
Linux Build Service Account 7257816b7d Merge "input: touchscreen: Correct return value check in Goodix driver" 2014-01-08 15:58:30 -08:00
Linux Build Service Account c4556330ac Merge "input: touchscreen: Clean code for i2c_read and i2c_write" 2014-01-08 15:58:29 -08:00
Amy Maloche 3ae0b94291 input: touchscreen: add Kconfig & Makefile entries for atmel_maxtouch_ts
Add entries so compilation can be chosen for latest
Atmel touchscreen driver.

Change-Id: Ib63a56215e52cc80cb8532c50b16112d39c1e6f7
Signed-off-by: Amy Maloche <amaloche@codeaurora.org>
2014-01-04 23:46:58 -08:00
Shantanu Jain d1b5b49e48 input: touchscreen: Remove irq polling from Goodix driver
Remove irq polling from Goodix driver.

CRs-fixed: 579853
Change-Id: I0a9037eac6e30a6319919043dd2ef1c226663af9
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2014-01-03 17:02:51 +05:30
Shantanu Jain bc953322de input: touchscreen: Add debugfs support for suspend/resume.
Add debugfs entry for suspend/resume that allow suspending/
resuming of Goodix CTP driver from userspace.
Also change the return type of goodix_ts_resume and
goodix_ts_suspend functions and set the status of
gtp_is_suspended in the last of above functions.

CRs-fixed: 554796
Change-Id: Ic2b1b2562b63ccecdf15bdc64ad7e45996d196d3
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2014-01-03 16:53:21 +05:30
Shantanu Jain 600079ea79 input: touchscreen: Code clean-up for Goodix driver
Fix errors and warnings found by checkpatch script in
goodix_tool.c and gt9xx_update.c.
Correct debug messages in goodix_update.c
Remove magic numbers for read-write flags with macros
in goodix_tool.c

Change-Id: I3a00fb46106f859128f0fa9b8c99b5d6ba24bc7b
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2014-01-03 16:43:50 +05:30
Shantanu Jain a48120a21d input: touchscreen: Replace Kernel thread with a workqueue
Replace the Firmware update Kernel thread with a workqueue
instead in gt9xx_update.c Goodix driver. Now the firmware
upgrade procedure can be called later in future time without
blocking the registration of the touchscreen driver.
Using a kernel thread is an overhead in the current driver
as it is a one shot thread, hence replaced it with a workqueue.

Change-Id: I0d4731148351652092fe7feede0b44828939d98b
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2014-01-03 16:42:14 +05:30
Shantanu Jain 22050954be input: touchscreen: Add virtual key support from dtsi
Add virtual key support from device tree node and
corrected the sequence of virtual keys defined in
dtsi for Goodix driver.

CRs-fixed: 567499
Change-Id: Iee1db2eb07c00fd4338255b9648fac5e05aa9c6d
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2014-01-03 16:31:25 +05:30
Shantanu Jain bc2385140e input: touchscreen: Remove improper debug code
Remove unnecessary, redundant and improper debug code
and replace them with standrad debug calls in Goodix
driver files.

Change-Id: I763598585cee9705d6def8b7fe61d3206788912b
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2014-01-03 16:28:06 +05:30
Shantanu Jain 07b3197d18 input: touchscreen: Add devm_kzalloc calls to goodix driver
Change the kzalloc calls to devm_kzalloc calls to
avoid explicit kfree calls. Remove redundant kfree calls
to avoid double free. Fix error check path on devm_kzalloc
return values. Also remove redundant goto labels.

CRs-fixed: 554778
Change-Id: I62f0ff800318882067bc0f16b021cb344e340ecf
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2014-01-03 16:25:45 +05:30
Shantanu Jain acbd3ab847 input: touchscreen: Clean initialising linux kernel code
Use designated initializer code in gt9xx_update.c and
goodix_tool.c Goodix drivers.

CRs-fixed: 554746
Change-Id: Idc5b45c09813486c926ce52b2d41e81df526219b
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2014-01-03 16:24:39 +05:30
Shantanu Jain 46d44a892a input: touchscreen: Use macros for magic numbers in Goodix drivers
Use macros instead of  magic numbers for maximum i2c retries in
Goodix driver.

CRs-fixed: 554725
Change-Id: I9f7da9f43418cd1d423aaf331f41d37d13f248d4
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2014-01-03 16:14:12 +05:30
Shantanu Jain 1e500ef109 input: touchscreen: Correct return value check in Goodix driver
Correct return value check of gtp_read_fw_version, called in probe
of the Goodix driver. The return value is actually the number of
registers read through gtp_i2c_read() function call.
Also change the error message of gtp_check_product_id.

Change-Id: I0b643e250a487f08a19555237802b020b0873d1a
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2014-01-03 16:12:27 +05:30
Shantanu Jain c624b3191a input: touchscreen: Clean code for i2c_read and i2c_write
Use standard initializer code in gtp_i2c_read and
gtp_i2c_write functions for Goodix touchscreen driver.

CRs-fixed: 549289
Change-Id: Id954be61a0b4596339a659928fb630c5c5538a9a
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2014-01-03 16:08:18 +05:30