public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH] atkbd: restore autorepeat rate after resume
@ 2006-06-26 14:21 Alan Stern
  2006-06-26 14:35 ` Dmitry Torokhov
  2006-06-26 14:52 ` Vojtech Pavlik
  0 siblings, 2 replies; 8+ messages in thread
From: Alan Stern @ 2006-06-26 14:21 UTC (permalink / raw)
  To: Andrew Morton; +Cc: Vojtech Pavlik, Kernel development list

From: Linus Torvalds <torvalds@osdl.org>

This patch (as728) makes the AT keyboard driver store the current
autorepeat rate so that it can be restored properly following a 
suspend/resume cycle.

Signed-off-by: Alan Stern <stern@rowland.harvard.edu>

---

Index: usb-2.6/drivers/input/keyboard/atkbd.c
===================================================================
--- usb-2.6.orig/drivers/input/keyboard/atkbd.c
+++ usb-2.6/drivers/input/keyboard/atkbd.c
@@ -39,6 +39,8 @@ static int atkbd_set = 2;
 module_param_named(set, atkbd_set, int, 0);
 MODULE_PARM_DESC(set, "Select keyboard code set (2 = default, 3 = PS/2 native)");
 
+static int atkbd_repeatrate;
+
 #if defined(__i386__) || defined(__x86_64__) || defined(__hppa__)
 static int atkbd_reset;
 #else
@@ -477,7 +479,7 @@ static void atkbd_event_work(void *data)
 			j++;
 		dev->rep[REP_PERIOD] = period[i];
 		dev->rep[REP_DELAY] = delay[j];
-		param[0] = i | (j << 5);
+		param[0] = atkbd_repeatrate = i | (j << 5);
 		ps2_command(&atkbd->ps2dev, param, ATKBD_CMD_SETREP);
 	}
 
@@ -676,10 +678,10 @@ static int atkbd_activate(struct atkbd *
 		return -1;
 
 /*
- * Set autorepeat to fastest possible.
+ * Set autorepeat to whatever it used to be.
  */
 
-	param[0] = 0;
+	param[0] = atkbd_repeatrate;
 	if (ps2_command(ps2dev, param, ATKBD_CMD_SETREP))
 		return -1;
 


^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2006-06-26 15:18 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-26 14:21 [PATCH] atkbd: restore autorepeat rate after resume Alan Stern
2006-06-26 14:35 ` Dmitry Torokhov
2006-06-26 14:53   ` Vojtech Pavlik
2006-06-26 14:58     ` Dmitry Torokhov
2006-06-26 15:01       ` Vojtech Pavlik
2006-06-26 15:16         ` Dmitry Torokhov
2006-06-26 15:18         ` Alan Stern
2006-06-26 14:52 ` Vojtech Pavlik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox