Drop 20msec sleep after touchpad disable

Andres Salomon dilinger at debian.unroutableorg
Wed Jan 3 03:36:24 EST 2007


Commit:     113d3f2084899a0f7038d7b629da3c015b9ecb14
Parent:     9fd3c2a295c5317ab0c275b96254f33952071952
commit 113d3f2084899a0f7038d7b629da3c015b9ecb14
Author:     Andres Salomon <dilinger at debian.org>
AuthorDate: Wed Dec 27 15:32:28 2006 -0500
Commit:     Andres Salomon <dilinger at debian.org>
CommitDate: Wed Dec 27 15:32:28 2006 -0500

    Drop 20msec sleep after touchpad disable
    
    When disabling the touchpad, ALPS told us we may need to wait up to 20msec.
    There's no reason to do that manually, afaict.
    
    Signed-off-by: Andres Salomon <dilinger at debian.org>
---
 drivers/input/mouse/olpc.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/input/mouse/olpc.c b/drivers/input/mouse/olpc.c
index e2cd563..a2f3af6 100644
--- a/drivers/input/mouse/olpc.c
+++ b/drivers/input/mouse/olpc.c
@@ -342,10 +342,13 @@ static void olpc_mode_switch(void *p)
 		return;
 	}
 
-	/* give it 20ms for the device to be disabled */
-	msleep(20);
+	/*
+	 * ALPS tells us that it may take up to 20msec for the disable to
+	 * take effect; however, ps2_command() will wait up to 200msec for
+	 * the ACK to come back (and I'm assuming that by the time the
+	 * hardware sends back its ACK, it has stopped sending bytes).
+	 */
 	pending_mode = priv->pending_mode;
-
 	if (tpdebug)
 		printk(KERN_WARNING __FILE__ ": Switching to %d. [%lu]\n", pending_mode, jiffies);
 


More information about the Commits-kernel mailing list