This patch removes the usage of deprecated apis like
usleep(), __devexit_p, etc.
This is a propagated patch from 3.18 kernel
'commit 20482b216b8a ("input: ft5x06_ts: remove
deprecated apis in 3.18 kernel")'
Change-Id: I77cedabdb234a643f96427f051038faad31bfdcf
Signed-off-by: Sudhakar Manapati <smanap@codeaurora.org>
When CONFIG_PM is not defined, there are some compilation errors,
because it introduces undeclared touch suspend and resume function.
This patch is propagated from 3.18 kernel
'commit a144428c6e02 ("input: ft5x06: add support when CONFIG_PM
is not defined")'
Change-Id: I869bd41270ea240c671e5478126a61d4ff2088dc
Signed-off-by: Chun Zhang <chunz@codeaurora.org>
Threaded IRQs without primary handler need to be requested with
IRQF_ONESHOT, otherwise the request will fail. This patch adds the
IRQF_ONESHOT to the focaltech touchscreen driver where it is
missing.
This patch is propagated from 3.18 kernel
'commit 4e8b58e99bf7 ("input: touchscreen: request threaded-only
IRQs with IRQF_ONESHOT")'
Change-Id: I429f48126bd5d28c6dbf6ba846175d5e643dd436
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
Force firmware update cannot work when touchscreen controller
cannot report correct family ID. If touchscreen is does not work
in correct state and it reports wrong family ID, it cannot be
recovered by force update, this change use family ID from device
tree instead of read from controller register to fix this issue.
This patch is propagated from 3.18 kernel
'commit a85789530620 ("input: touchscreen: ft5x06: fix firmware
force update issue")'
Change-Id: I85d24bfc68a7777053c15f28a84027260c68cebd
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
FT5336 use new firmware bootloader, current driver cannot update
its firmware. Driver needs update to support this new firmware
bootloader.
This patch is propagated from 3.18 kernel
'commit 740d7b108461 ("input: touchscreen: ft5x06: add FT5336
firmware update support")'
CRs-Fixed: 1046961
Change-Id: I5c210097a6b3daedce52c4dda806c698cda63968
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
Touchscreen driver may generate unbalanced input events when
enter suspend state, these unbalanced event will make input
system always wait for symmetrical input event and can not
handle input event properly. PRESSURE event is removed to
keep input events symmetrical.
This patch is propagated from msm-3.18 kernel
'commit 15725c248511 ("input: touchscreen: ft5x06: remove
unbalanced touch event")'
CRs-Fixed: 566134
Change-Id: I3f6fda3fb5d0a717ae943a9113be89623c96ce61
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
Focaltech touchscreen ICs may use different chip IDs for same module.
Add support to ignore ID check for such cases.
This patch is propagated from msm-3.10 kernel
'commit d6e831bdf2af ("input: touchscreen: add option to ignore
Focaltech family-id check")'
Also fix the checkpatch errors.
Change-Id: I0fe8da6a5e687317b4878b59ac5d1a4a4b620e1d
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
Signed-off-by: Sudhakar Manapati <smanap@codeaurora.org>
There is no need to send ABS_MT_PRESSURE event when contact is
removed from touchscreen, this redundant event will confuse some
APP and cause malfunction.
This patch is propagated from msm-3.18 kernel
'commit 75184ddcf2d1 ("input: touchscreen: remove PRESSURE event
from ft5x06 driver")'
CRs-Fixed: 537993
Change-Id: Ie2aef79f99cb80c10706f832cfab583ba742fdf1
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
Upgrade firmware on the controller only when a new
version of firmware is available.
This patch is propagated from msm-3.18 kernel
'commit 88d102ef081f ("input: ft5x06_ts: Upgrade
firmware based on version")'
Change-Id: I4cf75b3c5efb90f151da09ed73b1ba62b9b5bb1c
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
To support all models supported by focaltech push necessary
parameters to platform data.
This patch is propagated from msm-3.18 kernel
'commit 473f8cd84f93 ("input: ft5x06_ts: Parse board specific
parameters from pdata")'
Also fix the below checkpatch warnings on 3.18 Kernel.
WARNING: Possible unnecessary 'out of memory' message
+ if (!data) {
+ dev_err(&client->dev, "Not enough memory\n");
WARNING: Possible unnecessary 'out of memory' message
+ if (!data->ts_info) {
+ dev_err(&client->dev, "Not enough memory\n");
Change-Id: I00b0e8ba7cfc8d8fbd48aa910bd3d0010283ed00
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
Signed-off-by: Sudhakar Manapati <smanap@codeaurora.org>
Focaltech 6x06 controller series uses a different reset
register compared to earlier supported controllers. Use
appropriate reset registers based on controller's id.
This patch is propagated from 3.18 kernel
'commit 88dd4c27a3f6 ("input: ft5x06_ts: Add firmware
upgrade support for ft6x06")'
Change-Id: Ia72fa9c256f9e6e2db79388b0152f4d6724ec457
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
Focaltech controllers can reports the number of touch points by read
"TD_STATUS" register. Read this register to avoid always looping
through maximum number of touches supported.
This patch is propagated from 3.18 kernel
'commit 4c142d16fced ("input: touchpanel: fix the number of touch
events detection")'
Change-Id: I8ab111b56b2074cb52cb021d37e9e6505c8b7c72
Signed-off-by: Figo Wang <figow@codeaurora.org>
Signed-off-by: Bingzhe Cai <bingzhec@codeaurora.org>
Disable/enable the regulators in suspend/resume to
have better power savings.
This patch is propagated from 3.18 kernel
'commit 550c106ea1a3 ("input: ft5x06_ts: Disable
regulators in suspend")'
Change-Id: I8aa7e941f20040955d6cc177e70ed38dbd28af8c
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
Handle error if i2c read fails and undo other
probe initializations.
This patch is propagated from 3.18 kernel
'commit 0123456789ab ("input: ft5x06_ts: Handle error if
i2c read fails")'
Change-Id: I26180b057b45f4dad123dd3581e5c5f2b33a32aa
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
Release all the touches before going to suspend to avoid
sticky touches and correct multitouch ID error.
This patch is propagated from 3.18 kernel 'commit 8a123ff1f64b
("input: touchpanel: Release all touches during suspend")'
Change-Id: I5dd84d44478291e16fd577aad5cf06503e44fbde
Signed-off-by: Figo Wang <figow@codeaurora.org>
Add a debugfs entry to display information about controller to the user.
Also have cleared the checkpatch errors on 3.18
This patch is propagated from 3.18 kernel 'commit 71e8bfde1da8 ("input:
ft5x06_ts: Add debugfs entry for dump info")'
Change-Id: I075501fefe1984533139ecca65af92f3c0ab8b97
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
Signed-off-by: Sudhakar Manapati <smanap@codeaurora.org>
Focaltech touchscreen chips can use MT protocol B
because they can assign unique id to ABS_MT_TRACKING_ID
from finger id provided by hardware.
This patch is propagated from 3.18 kernel
'commit 836a4745d978 ("input: ft5x06_ts: Add support
for protocol B")'
Change-Id: I7f236d819eb805934e12faedaf84407b9de95c0e
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
Add debugfs support to provide addr and data
entries to read registers from controller.
Writing into the registers is not supported
as it might corrupt controller. Also add suspend
entry to dynamically test suspend and resume.
This patch is propagated from 3.18 kernel
'commit 0804395c18d8 ("input: ft5x06_ts: Add
debugfs support")'
Change-Id: If61bbbefdbf624f62b07c2a96d28c8338bd948c1
Signed-off-by: Mohan Pallaka <mpallaka@codeaurora.org>
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>