input: touch: maxim: correct resume
David Jung [Wed, 13 Nov 2013 18:44:11 +0000 (10:44 -0800)]
Maxim code drop to correct overzealous reverts which will allow touch to work
after resume.

Bug 1404490
Bug 1402764

Change-Id: I2e44bdd0013e58e43b123dff5e5991ca57ea0b7d
Signed-off-by: David Jung <djung@nvidia.com>
Reviewed-on: http://git-master/r/330618
Reviewed-by: Harry Hong <hhong@nvidia.com>
Tested-by: Harry Hong <hhong@nvidia.com>

drivers/input/touchscreen/maxim_sti.c

index c794053..fcfe812 100644 (file)
@@ -103,7 +103,7 @@ struct dev_data {
 #endif
 };
 
-atomic_t touch_dvdd_on = ATOMIC_INIT(1);
+atomic_t touch_dvdd_on = ATOMIC_INIT(0);
 static int prev_dvdd_rail_state;
 
 static struct list_head  dev_list;
@@ -1626,6 +1626,8 @@ static int processing_thread(void *arg)
                        complete(&dd->suspend_resume);
 
                        INFO("%s: suspended.", __func__);
+
+                       dd->expect_resume_ack = true;
                        while (!dd->resume_in_progress) {
                                /* the line below is a MUST */
                                set_current_state(TASK_INTERRUPTIBLE);