2003-07-04 23:05:11

by Peter Osterlund

[permalink] [raw]
Subject: Re: Early mail about synaptics driver

On Tue, 24 Jun 2003, P. Christeas wrote:

> I am trying to use your synaptics kernel driver. I do have the touchpad,
> which means that as from 2.573 the kernel tries to use that by default.
>
> The other important part (which I have solved) is that you set "disable
> gestures" by default. I don't know if this is required in absolute mode,
> but it surely makes the touchpad less useful in relative mode. That is,
> if I unload the module and reload it with 'psmouse_noext=1' [1], then
> the previous setting [2] applies and gestures are disabled.

I think it would be better to restore default settings when the driver is
unloaded, as in the patch below. I have verified that this patch solves
the problem on my computer using kernel 2.5.74.

diff -u -r linux/drivers/input/mouse.orig/psmouse-base.c linux/drivers/input/mouse/psmouse-base.c
--- linux/drivers/input/mouse.orig/psmouse-base.c Sat Jul 5 00:10:56 2003
+++ linux/drivers/input/mouse/psmouse-base.c Fri Jul 4 23:57:40 2003
@@ -478,9 +478,10 @@
static void psmouse_disconnect(struct serio *serio)
{
struct psmouse *psmouse = serio->private;
+ if (psmouse->type == PSMOUSE_SYNAPTICS)
+ synaptics_disconnect(psmouse);
input_unregister_device(&psmouse->dev);
serio_close(serio);
- synaptics_disconnect(psmouse);
kfree(psmouse);
}

diff -u -r linux/drivers/input/mouse.orig/synaptics.c linux/drivers/input/mouse/synaptics.c
--- linux/drivers/input/mouse.orig/synaptics.c Sat Jul 5 00:11:07 2003
+++ linux/drivers/input/mouse/synaptics.c Sat Jul 5 00:09:30 2003
@@ -144,7 +144,7 @@
static void print_ident(struct synaptics_data *priv)
{
printk(KERN_INFO "Synaptics Touchpad, model: %ld\n", SYN_ID_MODEL(priv->identity));
- printk(KERN_INFO " Firware: %ld.%ld\n", SYN_ID_MAJOR(priv->identity),
+ printk(KERN_INFO " Firmware: %ld.%ld\n", SYN_ID_MAJOR(priv->identity),
SYN_ID_MINOR(priv->identity));

if (SYN_MODEL_ROT180(priv->model_id))
@@ -228,7 +228,7 @@
/*
* The x/y limits are taken from the Synaptics TouchPad interfacing Guide,
* which says that they should be valid regardless of the actual size of
- * the senser.
+ * the sensor.
*/
set_bit(EV_ABS, psmouse->dev.evbit);
set_abs_params(&psmouse->dev, ABS_X, 1472, 5472, 0, 0);
@@ -259,6 +259,9 @@
{
struct synaptics_data *priv = psmouse->private;

+ /* Restore touchpad to power on default state */
+ synaptics_set_mode(psmouse, 0);
+
kfree(priv);
}


--
Peter Osterlund - [email protected]
http://w1.894.telia.com/~u89404340


2003-07-05 06:10:44

by Vojtech Pavlik

[permalink] [raw]
Subject: Re: Early mail about synaptics driver

On Sat, Jul 05, 2003 at 01:09:11AM +0200, Peter Osterlund wrote:
> On Tue, 24 Jun 2003, P. Christeas wrote:
>
> > I am trying to use your synaptics kernel driver. I do have the touchpad,
> > which means that as from 2.573 the kernel tries to use that by default.
> >
> > The other important part (which I have solved) is that you set "disable
> > gestures" by default. I don't know if this is required in absolute mode,
> > but it surely makes the touchpad less useful in relative mode. That is,
> > if I unload the module and reload it with 'psmouse_noext=1' [1], then
> > the previous setting [2] applies and gestures are disabled.
>
> I think it would be better to restore default settings when the driver is
> unloaded, as in the patch below. I have verified that this patch solves
> the problem on my computer using kernel 2.5.74.

Thanks, applied.



--
Vojtech Pavlik
SuSE Labs, SuSE CR