input: touch: maxim: Do not rely on previous state of reset
authorXiaohui Tao <xtao@nvidia.com>
Thu, 5 Sep 2013 22:34:35 +0000 (15:34 -0700)
committerMrutyunjay Sawant <msawant@nvidia.com>
Wed, 18 Sep 2013 06:28:00 +0000 (23:28 -0700)
commita5fbc334443c9b4087a67d877be0a9ed2af0088d
treefe8fd1e01ea0cbb4f1c367d762f5da932fcb331c
parent5333feaa046440c9bb8976c7653096388e27a12c
input: touch: maxim: Do not rely on previous state of reset

Currently the driver does a reset in their resume function
(1) rely on previous state of the reset pin
(2) rely on touch_fusion daemon to issue a reset signal

Both of them are not reliable since
(1) The reset pin is possibly not low when the system resumes
due to some racing communication between the daemon/driver/chip
or some communication between the daemon/driver/chip that is
aborted during rapid resume/suspend. This can result in the reset
signal in resume not issued to the chip and it can cause touch
not working.
(1) The chip/daemon may enter some wired state that cannot
recover so that the daemon cannot issue the reset signal correctly.

The solution is to issue a low signal to the chip in resume
function so that it can guarantee that a true reset signal is issued
to the chip.

Bug 1353325

Change-Id: I2ede0dbb8987457cde344cdba12889b708fd95e7
Signed-off-by: Xiaohui Tao <xtao@nvidia.com>
Reviewed-on: http://git-master/r/268630
(cherry picked from commit 107001b0b70d39a489fe7d708af01a475ff2cc56)
Reviewed-on: http://git-master/r/271078
Reviewed-by: Mrutyunjay Sawant <msawant@nvidia.com>
Tested-by: Mrutyunjay Sawant <msawant@nvidia.com>
drivers/input/touchscreen/maxim_sti.c