public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Vojtech Pavlik <vojtech@suse.cz>
To: Alan Stern <stern@rowland.harvard.edu>
Cc: Andrew Morton <akpm@osdl.org>,
	Kernel development list <linux-kernel@vger.kernel.org>,
	dtor_core@ameritech.net
Subject: Re: [PATCH] atkbd: restore autorepeat rate after resume
Date: Mon, 26 Jun 2006 16:52:37 +0200	[thread overview]
Message-ID: <20060626145237.GA24275@suse.cz> (raw)
In-Reply-To: <Pine.LNX.4.44L0.0606261017340.9467-100000@iolanthe.rowland.org>

On Mon, Jun 26, 2006 at 10:21:29AM -0400, Alan Stern wrote:
> 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>

IMO this should be done in keyboard.c, similar to the LED setting upon
keyboard plug-in.

> ---
> 
> 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;
>  
> 
> 
> 

-- 
Vojtech Pavlik
Director SuSE Labs

      parent reply	other threads:[~2006-06-26 14:52 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060626145237.GA24275@suse.cz \
    --to=vojtech@suse.cz \
    --cc=akpm@osdl.org \
    --cc=dtor_core@ameritech.net \
    --cc=linux-kernel@vger.kernel.org \
    --cc=stern@rowland.harvard.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox