Commit 445c90b5 authored by Vojtech Pavlik's avatar Vojtech Pavlik Committed by Linus Torvalds

[PATCH] input: Always reset PS/2 mouse resolution and update speed to

default values after probing

This sets the mouse to 100 samples/second, 200 dpi, 1:1 mapping, which
is a standard setting, as close to 2.4 XFree86 behavior as possible, and
a good performance setting, too. 

It also in the case of 'psmouse_noext' doesn't probe and set anything
all, though it still issues the RESET command. This is as safe as one
can get.

The only real problem remaining is that the report rate and resolution
cannot be set from XFree86 config and only is available as a
kernel/module parameter. The fix is, howewer not 2.6.0 material.
parent 44193e9c
...@@ -36,12 +36,10 @@ MODULE_PARM(psmouse_resetafter, "i"); ...@@ -36,12 +36,10 @@ MODULE_PARM(psmouse_resetafter, "i");
MODULE_PARM_DESC(psmouse_resetafter, "Reset Synaptics Touchpad after so many bad packets (0 = never)."); MODULE_PARM_DESC(psmouse_resetafter, "Reset Synaptics Touchpad after so many bad packets (0 = never).");
MODULE_LICENSE("GPL"); MODULE_LICENSE("GPL");
#define PSMOUSE_LOGITECH_SMARTSCROLL 1
static int psmouse_noext; static int psmouse_noext;
int psmouse_resolution; int psmouse_resolution = 200;
unsigned int psmouse_rate; unsigned int psmouse_rate = 100;
int psmouse_smartscroll = PSMOUSE_LOGITECH_SMARTSCROLL; int psmouse_smartscroll = 1;
unsigned int psmouse_resetafter; unsigned int psmouse_resetafter;
static char *psmouse_protocols[] = { "None", "PS/2", "PS2++", "PS2T++", "GenPS/2", "ImPS/2", "ImExPS/2", "SynPS/2"}; static char *psmouse_protocols[] = { "None", "PS/2", "PS2++", "PS2T++", "GenPS/2", "ImPS/2", "ImExPS/2", "SynPS/2"};
...@@ -466,22 +464,15 @@ static void psmouse_initialize(struct psmouse *psmouse) ...@@ -466,22 +464,15 @@ static void psmouse_initialize(struct psmouse *psmouse)
{ {
unsigned char param[2]; unsigned char param[2];
/* /*
* We set the mouse report rate. * We set the mouse report rate, resolution and scaling.
*/ */
if (psmouse_rate) if (!psmouse_noext) {
psmouse_set_rate(psmouse); psmouse_set_rate(psmouse);
/*
* We also set the resolution and scaling.
*/
if (psmouse_resolution)
psmouse_set_resolution(psmouse); psmouse_set_resolution(psmouse);
psmouse_command(psmouse, NULL, PSMOUSE_CMD_SETSCALE11); psmouse_command(psmouse, NULL, PSMOUSE_CMD_SETSCALE11);
}
/* /*
* We set the mouse into streaming mode. * We set the mouse into streaming mode.
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment