diff options
author | Xiaohui Tao <xtao@nvidia.com> | 2013-08-30 10:36:11 -0700 |
---|---|---|
committer | Gabby Lee <galee@nvidia.com> | 2013-09-01 19:03:16 -0700 |
commit | 107001b0b70d39a489fe7d708af01a475ff2cc56 (patch) | |
tree | e7a6439f15b484e356464f0bbd619a37efe10221 | |
parent | 9700803ce3d59714dbc50d425f77d9c0b986c9c9 (diff) |
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
GVS: Gerrit_Virtual_Submit
Reviewed-by: Bo Kim <bok@nvidia.com>
Reviewed-by: Gabby Lee <galee@nvidia.com>
-rw-r--r-- | drivers/input/touchscreen/maxim_sti.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/input/touchscreen/maxim_sti.c b/drivers/input/touchscreen/maxim_sti.c index 1fea097f8992..8653c4ea4ad8 100644 --- a/drivers/input/touchscreen/maxim_sti.c +++ b/drivers/input/touchscreen/maxim_sti.c @@ -762,10 +762,8 @@ static int suspend(struct device *dev) pdata->reset(pdata, 0); usleep_range(100, 120); ret = regulator_control(dd, false); - if (ret < 0) { - pdata->reset(pdata, 1); + if (ret < 0) return ret; - } #endif return 0; @@ -782,6 +780,7 @@ static int resume(struct device *dev) #if SUSPEND_POWER_OFF /* power-up and reset-high */ + pdata->reset(pdata, 0); ret = regulator_control(dd, true); if (ret < 0) return ret; |