Commit graph

573357 commits

Author SHA1 Message Date
Mao Li
fd296540ae input: ft5x06_ts: add proximity feature support
Focaltech's CTP FT6436 is able to behave like a proximity sensor.
Enable the driver support this new feature.

Also cleared the chekpatch warning on 3.18 kernel.

Change-Id: I7a6ec3a387536c512637b0bd8dab95e7cceca212
Signed-off-by: Mao Li <maol@codeaurora.org>
Signed-off-by: Sudhakar Manapati <smanap@codeaurora.org>
Signed-off-by: Abinaya P <abinayap@codeaurora.org>
2016-08-23 11:35:51 +05:30
Sudhakar Manapati
49aaf48f47 input: ft5x06_ts: add NULL pointer check
Add null pointer exception check for pointers which
may be NULL after memory allocation failure and may
be deferenced.

This patch is propagated from msm-3.18 kernel.
 'commit 5c6aa1bb97a3 ("input: ft5x06_ts: add NULL
pointer check")'

Change-Id: Ied34d548bff27f8f6da9f4c81896e4505cdce218
Signed-off-by: Sarada Prasanna Garnayak <c_sgarna@codeaurora.org>
Signed-off-by: Sudhakar Manapati <smanap@codeaurora.org>
2016-08-22 11:11:53 +05:30
Sudhakar Manapati
0d7758f93a input: ft5x06_ts: pinctrl and gpio config in suspend/resume path
When device switch to suspend state the gpio and pinctrl need to be
configured properly to prevent the touch controller current leakage in
device suspend state. The pinctrl must be configure first before
the gpio configuration. Select the pinctrl sleep state and after that
in gpio configuration part free both IRQ and reset gpio, and also set
direction of reset gpio to be input. If the gpio and pinctrl is not in
proper state the touch controller will not switch to the deep sleep state
and it will start consume current during the device suspend state.
To prevent this leakage current issue, pinctrl and gpio must be
configured properly.

This patch is propagated from msm-3.18 kernel.
'commit 494eae39f2a4 ("input: ft5x06_ts: pinctrl and gpio config in
suspend/resume path")'
Also cleared checkpatch errors on msm-3.18 kernel.

Change-Id: I0ec72bbbf12320ad22608522d1250614c6686fe3
Signed-off-by: Sarada Prasanna Garnayak <c_sgarna@codeaurora.org>
Signed-off-by: Sudhakar Manapati <smanap@codeaurora.org>
2016-08-22 11:04:59 +05:30
Shantanu Jain
14632a5cfb input: focaltech: release pinctrl resources on probe failure
devm_pinctrl_get() does not release the ownership of mux function
of pins in the associated pin-group whenever a failure occurs in
driver probe routine. i.e struct pin_desc's mux_owner field is
still marked as being in use after a failure occurs in probe.
As a result of this, if another driver tries to acquire the
ownership of same pin, it gets an error while applying that
setting. To fix this, explicitly release the mux function
ownership of the the pin, by adding a new pin-group in pinctrl
DT and a new pinctrl state in touch device's DT node. This new
pin-group does not have a function setting (qcom,pin-func property).
This new state is explicitly activated during a probe failure
and driver remove routine to release the mux function ownership.

The patch also reorganizes the pinctrl related code in driver.

This patch is propagated from msm-3.18 kernel.
'commit f09a0560dde9 ("input: focaltech: release pinctrl resources
on probe failure")'

Change-Id: I16a97fefc64dd171deb800b481aa74a797c9ad55
Signed-off-by: Shantanu Jain <shjain@codeaurora.org>
2016-08-21 21:51:45 -07:00
Mao Li
cbb13b31eb input: ft5x06_ts: fix the Focaltech CTP current leakage issue
Focaltech touch controller does not go to sleep in suspend because
the pinctrl operation inadvertently resets the touch controller.
Remove the pinctrl operation in suspend and resume callback to
prevent this spurious reset.

This patch is propagated from msm-3.18 kernel.
'commit 7e2ea02b16de ("input: ft5x06_ts: fix the Focaltech CTP
current leakage issue")'

CRs-Fixed: 1046961
Change-Id: Ifa02c0287195d7ce55fb2d8ac49ec1c8ae5baec9
Signed-off-by: Mao Li <maol@codeaurora.org>
2016-08-21 21:51:31 -07:00
Mao Li
888157c601 input: ft5x06_ts: add support for pinctrl framework
Migrate the Focaltech driver to use pinctrl framework for GPIO
configuration so that driver is compatible with targets that
use and targets that don't use pinctrl framework.

This patch is propagated from 3.18 kernel
'commit 266d1fe0f630 ("input: ft5x06_ts: add support for
pinctrl framework")'

Change-Id: I84fc2a6d30f831b4b054780b107ce105614855ea
Signed-off-by: Mao Li <maol@codeaurora.org>
2016-08-21 21:42:11 -07:00
Mao Li
405643a77e input: ft5x06_ts: check vendor id before upgrade FT firmware
Upgrade the firmware only if same vendor id is found both in existing
fw and new fw to be upgraded.

This patch is propagated from 3.18 kernel
'commit dba19fc86781 ("input: ft5x06_ts: check vendor id before
upgrade FT firmware")'

Change-Id: Idfc50da45891a1475ac6b35d80c7d725607cbf81
Signed-off-by: Mao Li <maol@codeaurora.org>
2016-08-21 21:41:58 -07:00
Sudhakar Manapati
fa14a65666 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
firmware version id after successful firmware update. skip
firmware update when device is in suspend state.

This patch is propagated from msm-3.18 kernel
'commit 8399308e570e ("input: touchscreen: change the focaltech
firmware upgrade method")'

CRs-Fixed: 1046961
Change-Id: Ic462f6483887a3654665852e58ae9891de9f5eff
Signed-off-by: Sarada Prasanna Garnayak <c_sgarna@codeaurora.org>
Signed-off-by: Sudhakar Manapati <smanap@codeaurora.org>
2016-08-21 21:41:40 -07:00
Mao Li
19cda0c39a input: ft5x06_ts: add support for firmware update for CTP FT6X36
The firmware image format is changed in CTP FT6436. Also vendor
id and version id are read from fw image from a different offset
as compared to previous controllers. The driver is updated to
support the new image format.

This patch is propagated from msm-3.18 kernel
'commit 6146c68f81b4 ("input: ft5x06_ts: add support for firmware
update for CTP FT6X36")'

Change-Id: I465fdfa73e56e8fc4bbfdde980c558e4715d6d08
Signed-off-by: Mao Li <maol@codeaurora.org>
Signed-off-by: Sudhakar Manapati <smanap@codeaurora.org>
2016-08-21 21:12:40 -07:00
Sudhakar Manapati
a80c7960f1 input: ft5x06_ts: remove deprecated apis in 3.18 kernel
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>
2016-08-21 21:12:17 -07:00
Chun Zhang
af3203fa14 input: ft5x06: add support when CONFIG_PM is not defined
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>
2016-08-21 21:11:58 -07:00
Shantanu Jain
13954554dc input: touchscreen: request threaded-only IRQs with IRQF_ONESHOT
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>
2016-08-21 21:11:21 -07:00
Bingzhe Cai
6b5ef7a553 input: touchscreen: ft5x06: fix firmware force update issue
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>
2016-08-21 21:11:04 -07:00
Bingzhe Cai
f51bd56922 input: touchscreen: ft5x06: add FT5336 firmware update support
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>
2016-08-22 09:36:31 +05:30
Bingzhe Cai
0530539198 input: touchscreen: ft5x06: remove unbalanced touch event
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>
2016-08-19 10:54:00 +05:30
Bingzhe Cai
8ac5a9e361 input: touchscreen: add option to ignore Focaltech family-id check
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>
2016-08-17 17:13:46 +05:30
Bingzhe Cai
07d93257c6 input: touchscreen: remove PRESSURE event from ft5x06 driver
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>
2016-08-17 17:07:57 +05:30
Mohan Pallaka
bf71f01cc7 input: ft5x06_ts: Upgrade firmware based on version
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>
2016-08-17 16:59:15 +05:30
Mohan Pallaka
72436be454 input: ft5x06_ts: Parse board specific parameters from pdata
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>
2016-08-17 16:53:44 +05:30
Mohan Pallaka
cb040c2f61 input: ft5x06_ts: Add firmware upgrade support for ft6x06
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>
2016-08-17 16:47:23 +05:30
Figo Wang
8f5d6d8fd0 input: touchpanel: fix the number of touch events detection
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>
2016-08-17 16:41:53 +05:30
Mohan Pallaka
e6d2a8e4bb input: ft5x06_ts: Disable regulators in suspend
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>
2016-08-17 16:36:42 +05:30
Shantanu Jain
faca745b0b input: ft5x06_ts: Handle error if i2c read fails
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>
2016-08-17 16:32:08 +05:30
Figo Wang
849d4f3c1c input: touchpanel: Release all touches during suspend
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>
2016-08-17 15:58:56 +05:30
Mohan Pallaka
c72652e02f input: ft5x06_ts: Add debugfs entry for dump info
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>
2016-08-17 15:48:34 +05:30
Mohan Pallaka
19bdb8e2d1 input: ft5x06_ts: Add support for protocol B
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>
2016-08-16 22:12:04 -07:00
Mohan Pallaka
a5b633b984 input: ft5x06_ts: Add debugfs support
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>
2016-08-16 04:26:53 -07:00
Linux Build Service Account
2e45ea7281 Merge "ARM: dts: msm: add MSM External display node for msmcobalt" 2016-08-13 23:13:24 -07:00
Linux Build Service Account
39c747dfde Merge "msm: audio: soc: add null checks for hdmi ops" 2016-08-13 23:13:24 -07:00
Linux Build Service Account
f71490ad6f Merge "ARM: dts: msm: update pinctrl for touch gpios in msmcobalt" 2016-08-13 23:13:23 -07:00
Linux Build Service Account
47bd5a5b0c Merge "ARM: dts: msm: Update USB bus voting to allow SVS on msmcobalt" 2016-08-13 23:13:22 -07:00
Linux Build Service Account
5096eccb28 Merge "iommu/arm-smmu: support static context banks" 2016-08-13 23:13:21 -07:00
Linux Build Service Account
274f74b309 Merge "arm64: defconfig: msm: enable CPUSETS" 2016-08-13 23:13:20 -07:00
Linux Build Service Account
05feb03895 Merge "ARM: dts: msm: Modify csiphy timer clock rate on msmcobalt" 2016-08-13 23:13:19 -07:00
Linux Build Service Account
515b346c11 Merge "msm: camera: Add VAF active and suspend handles to eeprom node" 2016-08-13 23:13:18 -07:00
Linux Build Service Account
dfcec04e27 Merge "ARM: dts: msm: Fix qsee_ipc_irq_bridge IRQ clear mask for msmcobalt" 2016-08-13 23:13:16 -07:00
Linux Build Service Account
ac949b0d87 Merge "ARM: dts: msm: Remove clocks listed under the UFS GDSC node" 2016-08-13 23:13:15 -07:00
Linux Build Service Account
f2693fff2e Merge "msm: kgsl: update GPU busy statistics" 2016-08-13 23:13:14 -07:00
Linux Build Service Account
77e4349ae1 Merge "msm: mdss: fix dma fifo read watermark to 15/16 full" 2016-08-13 23:13:12 -07:00
Linux Build Service Account
0ec8200353 Merge "ARM: dts: msm: add jdi 1080p video mode panel support for msmcobalt" 2016-08-13 23:13:11 -07:00
Linux Build Service Account
98cdd5294e Merge "arm: dts: msm: Added missing features for HW Encryption support" 2016-08-13 23:13:10 -07:00
Linux Build Service Account
101be18f7b Merge "ice: added missing register dump in case of error for ICE 3.0" 2016-08-13 23:13:10 -07:00
Linux Build Service Account
4c9e200e82 Merge "ARM: dts: msm: Update the interrupt list for msmcobalt" 2016-08-13 23:13:09 -07:00
Linux Build Service Account
d736395565 Merge "qcom-charger: smblib: update batt capacity status from bms" 2016-08-13 23:13:08 -07:00
Linux Build Service Account
6ece03e7b9 Merge "ASoC: wcd-mbhc: enable micbias for special headset" 2016-08-13 23:13:08 -07:00
Linux Build Service Account
76a2edf258 Merge "ARM: dts: msm: Enable thermal mitigation for msmcobalt charger" 2016-08-13 23:13:07 -07:00
Linux Build Service Account
f4b1836237 Merge "qcom-charger: smblib: update ICL votings in parallel charging" 2016-08-13 23:13:06 -07:00
Linux Build Service Account
9d8e34f721 Merge "defconfig: msmcortex: Enable Seemp Log driver" 2016-08-13 23:13:06 -07:00
Linux Build Service Account
ed4b331fe7 Merge "ASoC: wcd9335: Update the Lineout path register configuration" 2016-08-13 23:13:04 -07:00
Linux Build Service Account
fb6752ab65 Merge "ASoC: wcd: change classh settings as per impedance value" 2016-08-13 23:13:04 -07:00