input: touch: maxim: Refine power control
authorXiaohui Tao <xtao@nvidia.com>
Thu, 29 Aug 2013 00:18:01 +0000 (17:18 -0700)
committerMrutyunjay Sawant <msawant@nvidia.com>
Tue, 17 Sep 2013 05:52:26 +0000 (22:52 -0700)
commite0517e2e932e3cba79c2e07d86934e1d2b9e3472
treed0f5c2bee38a5415c119fcae3831f40dcb8332b3
parent36dd739c294e67357cf1be371306a16158d85331
input: touch: maxim: Refine power control

(1) Move regulator control from threaded func to probe func since
the current machanism will kill the direct touch daemon and restart
it when it is not responding. Keeping the regulator code there will
make ref count go up, which will keep the power rail always on.

(2) Do not call suspend/resume in display off case for touch. Touch
suspend/resume should be consistent with display off/on. There is no
need to turn touch on/off in display off case.

Bug 1353325
Bug 1350928

Change-Id: Id9719f04398be0032faf2c9f685400b292458b06
Signed-off-by: Xiaohui Tao <xtao@nvidia.com>
Reviewed-on: http://git-master/r/267625
(cherry picked from commit 9700803ce3d59714dbc50d425f77d9c0b986c9c9)
Reviewed-on: http://git-master/r/271075
Reviewed-by: Mrutyunjay Sawant <msawant@nvidia.com>
Tested-by: Mrutyunjay Sawant <msawant@nvidia.com>
drivers/input/touchscreen/maxim_sti.c