Skip to contentSkip to conversation

New set of input patches

PATCH In review Dmitry Torokhov 3 participants 39 messages Jan 3, 2004 – Mar 29, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

Hi Vojtech,

I have a new set of input patches, could you take look at them?

1. i8042-suspend.patch
Add suspend methods to i8042 to restore BIOS settings on suspend and kill polling timer which sometimes prevents APM suspend

2. i8042-options-parsing.patch
psmouse-options-parsing.patch
atkbd-options.parsing
Complete conversion to the new way of parsing parameters. Drop "i8042_", "psmouse_" and "atkbd_" prefixes from option names when compiled as a module and require "i8042.", "psmouse." and "atkbd." prefixes if built into the kernel.

3. missing-module-license.patch
Maple and newton keyboard drivers were missing MODULE_LICENSE("GPL")

4. kconfig-synaptics-help.patch
Suggest psmouse.proto=imps to Synaptics users who do not want install native XFree Synaptics driver so taps would still work

5. sis-aux-port.patch
Do not ignore AUX port if chipset fails to disable it when we do probes as SiS is having trouble disabling but otherwise mouse works fine.

The patches are on top of 2 other input patches (remove jitter and ps2 emulation) that I have sent to the list earlier. You can find the complete set of patches at http://www.geocities.com/dt_or/input/2_6_0-rc1/ and
http://www.geocities.com/dt_or/input/2_6_0-rc1-mm1/

Dmitry

#1 lore raw

PATCH 1/7 i8042 suspend

===================================================================

[email protected], 2004-01-02 00:22:32-05:00, [email protected]
Input: Add suspend methods to restore original controller state
on suspend as some BIOS don't like the state we leave it in. Also synchroniously delete the polling timer on module exit.

 i8042.c |   76 +++++++++++++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 54 insertions(+), 22 deletions(-)

===================================================================

drivers/input/serio/i8042.c +54 -22
diff -Nru a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
@@ -746,6 +746,29 @@
 
 
 /*
+ * Reset the controller.
+ */
+void i8042_controller_reset(void)
+{
+	if (i8042_reset) {
+		unsigned char param;
+
+		if (i8042_command(&param, I8042_CMD_CTL_TEST))
+			printk(KERN_ERR "i8042.c: i8042 controller reset timeout.\n");
+	}
+
+/*
+ * Restore the original control register setting.
+ */
+
+	i8042_ctr = i8042_initial_ctr;
+
+	if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR))
+		printk(KERN_WARNING "i8042.c: Can't restore CTR.\n");
+}
+
+
+/*
  * Here we try to reset everything back to a state in which the BIOS will be
  * able to talk to the hardware when rebooting.
  */
@@ -770,26 +793,20 @@
 		if (i8042_mux_values[i].exists)
 			serio_cleanup(i8042_mux_port + i);
 
-/*
- * Reset the controller.
- */
-
-	if (i8042_reset) {
-		unsigned char param;
+	i8042_controller_reset();
+}
 
-		if (i8042_command(&param, I8042_CMD_CTL_TEST))
-			printk(KERN_ERR "i8042.c: i8042 controller reset timeout.\n");
-	}
 
 /*
- * Restore the original control register setting.
+ * Here we try to restore the original BIOS settings
  */
 
-	i8042_ctr = i8042_initial_ctr;
-
-	if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR))
-		printk(KERN_WARNING "i8042.c: Can't restore CTR.\n");
+static int i8042_controller_suspend(void)
+{
+	del_timer_sync(&i8042_timer);
+	i8042_controller_reset();
 
+	return 0;
 }
 
 
@@ -809,7 +826,7 @@
 	if (i8042_mux_present)
 		if (i8042_enable_mux_mode(&i8042_aux_values, NULL) ||
 		    i8042_enable_mux_ports(&i8042_aux_values)) {
-			printk(KERN_WARNING "i8042: failed to resume active multiplexor, mouse won't wotk.\n");
+			printk(KERN_WARNING "i8042: failed to resume active multiplexor, mouse won't work.\n");
 		}
 
 /*
@@ -825,6 +842,10 @@
 	for (i = 0; i < 4; i++)
 		if (i8042_mux_values[i].exists && i8042_activate_port(i8042_mux_port + i) == 0)
 			serio_reconnect(i8042_mux_port + i);
+/*
+ * Restart timer (for polling "stuck" data)
+ */ 
+	mod_timer(&i8042_timer, jiffies + I8042_POLL_PERIOD);
 
 	return 0;
 }
@@ -851,16 +872,22 @@
 };
 
 /*
- * Resume handler for the new PM scheme (driver model)
+ * Suspend/resume handlers for the new PM scheme (driver model)
  */
+static int i8042_suspend(struct sys_device *dev, u32 state)
+{
+	return i8042_controller_suspend();
+}
+
 static int i8042_resume(struct sys_device *dev)
 {
 	return i8042_controller_resume();
 }
 
 static struct sysdev_class kbc_sysclass = {
-       set_kset_name("i8042"),
-       .resume = i8042_resume,
+	set_kset_name("i8042"),
+	.suspend = i8042_suspend,
+	.resume = i8042_resume,
 };
 
 static struct sys_device device_i8042 = {
@@ -869,12 +896,17 @@
 };
 
 /*
- * Resume handler for the old PM scheme (APM)
+ * Suspend/resume handler for the old PM scheme (APM)
  */
 static int i8042_pm_callback(struct pm_dev *dev, pm_request_t request, void *dummy)
 {
-	if (request == PM_RESUME)
-		return i8042_controller_resume();
+	switch (request) {
+		case PM_SUSPEND:
+			return i8042_controller_suspend();
+
+		case PM_RESUME:
+			return i8042_controller_resume();
+	}
 
 	return 0;
 }
@@ -955,7 +987,7 @@
 		sysdev_class_unregister(&kbc_sysclass);
 	}
 
-	del_timer(&i8042_timer);
+	del_timer_sync(&i8042_timer);
 
 	i8042_controller_cleanup();
 	
#2 lore raw

Re: [PATCH 2/7] i8042 option parsing

===================================================================

[email protected], 2004-01-02 02:46:43-05:00, [email protected]
Input: With Vojtech's approval adjusted i8042 option names by
dropping i8042_ prefix.

If i8042 is compiled as a module new option names are:
direct, dumbkbd, noaux, nomux, reset, unlock

If i8042 is build in the kernel the prefix "i8042." is required in front of an option, like "i8042.reset"

 Documentation/kernel-parameters.txt |   16 +++++++++-------
 drivers/input/serio/i8042.c         |   18 ++++++++++++------
 2 files changed, 21 insertions(+), 13 deletions(-)

===================================================================

Documentation/kernel-parameters.txt +9 -7
diff -Nru a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
@@ -372,13 +372,15 @@
 
 	noirqbalance	[IA-32,SMP,KNL] Disable kernel irq balancing
 
-	i8042_direct	[HW] Keyboard has been put into non-translated mode 
-			by BIOS
-	i8042_dumbkbd	[HW] Don't attempt to blink the leds
-	i8042_noaux	[HW] Don't check for auxiliary (== mouse) port
-	i8042_nomux
-	i8042_reset	[HW] Reset the controller during init and cleanup
-	i8042_unlock	[HW] Unlock (ignore) the keylock
+	i8042.direct	[HW] Put keyboard port into non-translated mode 
+	i8042.dumbkbd	[HW] Pretend that controlled can only read data from
+			     keyboard and can not control its state
+			     (Don't attempt to blink the leds)
+	i8042.noaux	[HW] Don't check for auxiliary (== mouse) port
+	i8042.nomux	[HW] Don't check presence of an active multiplexing
+			     controller
+	i8042.reset	[HW] Reset the controller during init and cleanup
+	i8042.unlock	[HW] Unlock (ignore) the keylock
 
 	i810=		[HW,DRM]
 
drivers/input/serio/i8042.c +12 -6
diff -Nru a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
@@ -29,22 +29,28 @@
 MODULE_LICENSE("GPL");
 
 static unsigned int i8042_noaux;
-module_param(i8042_noaux, bool, 0);
+module_param_named(noaux, i8042_noaux, bool, 0);
+MODULE_PARM_DESC(noaux, "Do not probe or use AUX (mouse) port.");
 
 static unsigned int i8042_nomux;
-module_param(i8042_nomux, bool, 0);
+module_param_named(nomux, i8042_nomux, bool, 0);
+MODULE_PARM_DESC(nomux, "Do not check whether an active multiplexing conrtoller is present.");
 
 static unsigned int i8042_unlock;
-module_param(i8042_unlock, bool, 0);
+module_param_named(unlock, i8042_unlock, bool, 0);
+MODULE_PARM_DESC(unlock, "Ignore keyboard lock.");
 
 static unsigned int i8042_reset;
-module_param(i8042_reset, bool, 0);
+module_param_named(reset, i8042_reset, bool, 0);
+MODULE_PARM_DESC(reset, "Reset controller during init and cleanup.");
 
 static unsigned int i8042_direct;
-module_param(i8042_direct, bool, 0);
+module_param_named(direct, i8042_direct, bool, 0);
+MODULE_PARM_DESC(direct, "Put keyboard port into non-translated mode.");
 
 static unsigned int i8042_dumbkbd;
-module_param(i8042_dumbkbd, bool, 0);
+module_param_named(dumbkbd, i8042_dumbkbd, bool, 0);
+MODULE_PARM_DESC(dumbkbd, "Pretend that controller can only read data from keyboard");
 
 #undef DEBUG
 #include "i8042.h"
#3 lore raw

Re: [PATCH 3/7] psmouse option parsing

===================================================================

[email protected], 2004-01-02 03:02:35-05:00, [email protected]
Input: With Vojtech's approval adjusted psmouse option names by
dropping psmouse_ prefix.

If psmouse is compiled as a module new option names are:
proto, rate, resetafter, resolution, smartscroll

If psmouse is built in the kernel the prefix "psmouse." is required in front of an option, like "psmouse.proto"

Also, since we are changing all names, killed psmouse_noext completely

 Documentation/kernel-parameters.txt |   12 +++++++++---
 drivers/input/mouse/psmouse-base.c  |   30 ++++++++++--------------------
 2 files changed, 19 insertions(+), 23 deletions(-)

===================================================================

Documentation/kernel-parameters.txt +9 -3
diff -Nru a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
@@ -797,12 +797,18 @@
 			before loading.
 			See Documentation/ramdisk.txt.
 
-	psmouse_proto=  [HW,MOUSE] Highest PS2 mouse protocol extension to
+	psmouse.proto=  [HW,MOUSE] Highest PS2 mouse protocol extension to
 			probe for (bare|imps|exps).
-
-	psmouse_resetafter=
+	psmouse.rate=	[HW,MOUSE] Set desired mouse report rate, in reports
+			per second.
+	psmouse.resetafter=
 			[HW,MOUSE] Try to reset Synaptics Touchpad after so many
 			bad packets (0 = never).
+	psmouse.resolution=
+			[HW,MOUSE] Set desired mouse resolution, in dpi.
+	psmouse.smartscroll=
+			[HW,MOUSE] Controls Logitech smartscroll autoreteat,
+			0 = disabled, 1 = enabled (default). 
 
 	pss=		[HW,OSS] Personal Sound System (ECHO ESC614)
 			Format: <io>,<mss_io>,<mss_irq>,<mss_dma>,<mpu_io>,<mpu_irq>
drivers/input/mouse/psmouse-base.c +10 -20
diff -Nru a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
@@ -35,30 +35,26 @@
 MODULE_DESCRIPTION("PS/2 mouse driver");
 MODULE_LICENSE("GPL");
 
-static int psmouse_noext;
-module_param(psmouse_noext, int, 0);
-MODULE_PARM_DESC(psmouse_noext, "[DEPRECATED] Disable any protocol extensions. Useful for KVM switches.");
-
 static char *psmouse_proto;
 static unsigned int psmouse_max_proto = -1U;
-module_param(psmouse_proto, charp, 0);
-MODULE_PARM_DESC(psmouse_proto, "Highest protocol extension to probe (bare, imps, exps). Useful for KVM switches.");
+module_param_named(proto, psmouse_proto, charp, 0);
+MODULE_PARM_DESC(proto, "Highest protocol extension to probe (bare, imps, exps). Useful for KVM switches.");
 
 int psmouse_resolution = 200;
-module_param(psmouse_resolution, uint, 0);
-MODULE_PARM_DESC(psmouse_resolution, "Resolution, in dpi.");
+module_param_named(resolution, psmouse_resolution, uint, 0);
+MODULE_PARM_DESC(resolution, "Resolution, in dpi.");
 
 unsigned int psmouse_rate = 100;
-module_param(psmouse_rate, uint, 0);
-MODULE_PARM_DESC(psmouse_rate, "Report rate, in reports per second.");
+module_param_named(rate, psmouse_rate, uint, 0);
+MODULE_PARM_DESC(rate, "Report rate, in reports per second.");
 
 int psmouse_smartscroll = 1;
-module_param(psmouse_smartscroll, bool, 0);
-MODULE_PARM_DESC(psmouse_smartscroll, "Logitech Smartscroll autorepeat, 1 = enabled (default), 0 = disabled.");
+module_param_named(smartscroll, psmouse_smartscroll, bool, 0);
+MODULE_PARM_DESC(smartscroll, "Logitech Smartscroll autorepeat, 1 = enabled (default), 0 = disabled.");
 
 unsigned int psmouse_resetafter;
-module_param(psmouse_resetafter, uint, 0);
-MODULE_PARM_DESC(psmouse_resetafter, "Reset Synaptics Touchpad after so many bad packets (0 = never).");
+module_param_named(resetafter, psmouse_resetafter, uint, 0);
+MODULE_PARM_DESC(resetafter, "Reset Synaptics Touchpad after so many bad packets (0 = never).");
 
 static char *psmouse_protocols[] = { "None", "PS/2", "PS2++", "PS2T++", "GenPS/2", "ImPS/2", "ImExPS/2", "SynPS/2"};
 
@@ -674,12 +670,6 @@
 
 static inline void psmouse_parse_proto(void)
 {
-	if (psmouse_noext) {
-		printk(KERN_WARNING "psmouse: 'psmouse_noext' option is deprecated, please use 'psmouse_proto'\n");
-		psmouse_max_proto = PSMOUSE_PS2;
-	}
-
-	/* even is psmouse_noext is present psmouse_proto overrides it */
 	if (psmouse_proto) {
 		if (!strcmp(psmouse_proto, "bare"))
 			psmouse_max_proto = PSMOUSE_PS2;
#4 lore raw

Re: [PATCH 4/7] atkbd option parsing

===================================================================

[email protected], 2004-01-03 02:45:27-05:00, [email protected]
Input: converted atkbd to the new style of option parsing.
If compiled as a module new option names are:
set, softrepeat, reset.
If built into the kernel options must be prepended with "atkbd." prefix, like "atkbd.softrepeat"

 Documentation/kernel-parameters.txt |    7 +++---
 drivers/input/keyboard/atkbd.c      |   40 ++++++++----------------------------
 2 files changed, 13 insertions(+), 34 deletions(-)

===================================================================

Documentation/kernel-parameters.txt +4 -3
diff -Nru a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
@@ -153,10 +153,11 @@
 
 	atascsi=	[HW,SCSI] Atari SCSI
 
-	atkbd_set=	[HW] Select keyboard code set
+	atkbd.set=	[HW] Select keyboard code set
 			Format: <int>
-
-	atkbd_reset	[HW] Reset keyboard during initialization
+	atkbd.softrepeat=
+			[HW] Use software keyboard repeat
+	atkbd.reset=	[HW] Reset keyboard during initialization
 
 	autotest	[IA64]
 
drivers/input/keyboard/atkbd.c +9 -31
diff -Nru a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
@@ -19,6 +19,7 @@
 
 #include <linux/delay.h>
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/slab.h>
 #include <linux/interrupt.h>
 #include <linux/init.h>
@@ -29,18 +30,23 @@
 
 MODULE_AUTHOR("Vojtech Pavlik <[email protected]>");
 MODULE_DESCRIPTION("AT and PS/2 keyboard driver");
-MODULE_PARM(atkbd_set, "1i");
-MODULE_PARM(atkbd_reset, "1i");
-MODULE_PARM(atkbd_softrepeat, "1i");
 MODULE_LICENSE("GPL");
 
 static int atkbd_set = 2;
+module_param_named(set, atkbd_set, int, 0);
+MODULE_PARM_DESC(set, "Select keyboard code set (2 = default, 3, 4)");
+
 #if defined(__i386__) || defined (__x86_64__)
 static int atkbd_reset;
 #else
 static int atkbd_reset = 1;
 #endif
+module_param_named(reset, atkbd_reset, bool, 0);
+MODULE_PARM_DESC(reset, "Reset keyboard during initialization");
+
 static int atkbd_softrepeat;
+module_param_named(softrepeat, atkbd_softrepeat, bool, 0);
+MODULE_PARM_DESC(softrepeat, "Use software keyboard repeat");
 
 /*
  * Scancode to keycode tables. These are just the default setting, and
@@ -759,34 +765,6 @@
 	.disconnect =	atkbd_disconnect,
 	.cleanup =	atkbd_cleanup,
 };
-
-#ifndef MODULE
-static int __init atkbd_setup_set(char *str)
-{
-        int ints[4];
-        str = get_options(str, ARRAY_SIZE(ints), ints);
-        if (ints[0] > 0) atkbd_set = ints[1];
-        return 1;
-}
-static int __init atkbd_setup_reset(char *str)
-{
-        int ints[4];
-        str = get_options(str, ARRAY_SIZE(ints), ints);
-        if (ints[0] > 0) atkbd_reset = ints[1];
-        return 1;
-}
-static int __init atkbd_setup_softrepeat(char *str)
-{
-        int ints[4];
-        str = get_options(str, ARRAY_SIZE(ints), ints);
-        if (ints[0] > 0) atkbd_softrepeat = ints[1];
-        return 1;
-}
-
-__setup("atkbd_set=", atkbd_setup_set);
-__setup("atkbd_reset", atkbd_setup_reset);
-__setup("atkbd_softrepeat=", atkbd_setup_softrepeat);
-#endif
 
 int __init atkbd_init(void)
 {
#5 lore raw

Re: [PATCH 5/7] missing module licenses

===================================================================

[email protected], 2004-01-03 02:47:21-05:00, [email protected]
Input: Add missing MODULE_LICENSEs

 maple_keyb.c |    1 +
 newtonkbd.c  |    2 ++
 2 files changed, 3 insertions(+)

===================================================================

drivers/input/keyboard/maple_keyb.c +1 -0
diff -Nru a/drivers/input/keyboard/maple_keyb.c b/drivers/input/keyboard/maple_keyb.c
@@ -14,6 +14,7 @@
 
 MODULE_AUTHOR("YAEGASHI Takeshi <[email protected]>");
 MODULE_DESCRIPTION("SEGA Dreamcast keyboard driver");
+MODULE_LICENSE("GPL");
 
 static unsigned char dc_kbd_keycode[256] = {
 	  0,  0,  0,  0, 30, 48, 46, 32, 18, 33, 34, 35, 23, 36, 37, 38,
drivers/input/keyboard/newtonkbd.c +2 -0
diff -Nru a/drivers/input/keyboard/newtonkbd.c b/drivers/input/keyboard/newtonkbd.c
@@ -33,6 +33,8 @@
 #include <linux/serio.h>
 
 MODULE_AUTHOR("Justin Cormack <[email protected]>");
+MODULE_DESCRIPTION("Newton keyboard driver");
+MODULE_LICENSE("GPL");
 
 #define NKBD_KEY	0x7f
 #define NKBD_PRESS	0x80
#6 lore raw

Re: [PATCH 6/7] Kconfig Synaptics help

===================================================================

[email protected], 2004-01-03 02:49:55-05:00, [email protected]
Input: Kconfig help section update -
Suggest psmouse.proto=imps option to Synaptics users who do not want installing native XFree driver but want tapping work

 Kconfig |    2 ++
 1 files changed, 2 insertions(+)

===================================================================

drivers/input/mouse/Kconfig +2 -0
diff -Nru a/drivers/input/mouse/Kconfig b/drivers/input/mouse/Kconfig
@@ -29,6 +29,8 @@
 	  and a new verion of GPM at:
 		http://www.geocities.com/dt_or/gpm/gpm.html
 	  to take advantage of the advanced features of the touchpad.
+	  If you do not want install specialized drivers but want tapping
+	  working please use option psmouse.proto=imps.
 
 	  If unsure, say Y.
 
#7 lore raw

Re: [PATCH 7/7] SiS AUX port

===================================================================

[email protected], 2004-01-03 02:54:28-05:00, [email protected]
Input: Do not ignore AUX port if chipset fails to disable it
(SiS seems to have trouble disabling AUX port, other
than that the port works fine).

 i8042.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

===================================================================

drivers/input/serio/i8042.c +4 -2
diff -Nru a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
@@ -598,8 +598,10 @@
 	
 	if (i8042_command(&param, I8042_CMD_AUX_DISABLE))
 		return -1;
-	if (i8042_command(&param, I8042_CMD_CTL_RCTR) || (~param & I8042_CTR_AUXDIS))
-		return -1;	
+	if (i8042_command(&param, I8042_CMD_CTL_RCTR) || (~param & I8042_CTR_AUXDIS)) {
+		printk(KERN_WARNING "Failed to disable AUX port, but continuing anyway... Is this a SiS?\n");
+		printk(KERN_WARNING "If AUX port is really absent please use the 'i8042.noaux' option.\n");
+	}
 
 	if (i8042_command(&param, I8042_CMD_AUX_ENABLE))
 		return -1;
#8 lore raw

Re: [PATCH 7/7] SiS AUX port

In reply to Dmitry Torokhov

===================================================================

[email protected], 2004-01-03 02:54:28-05:00, [email protected]
Input: Do not ignore AUX port if chipset fails to disable it
(SiS seems to have trouble disabling AUX port, other
than that the port works fine).

 i8042.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

===================================================================

drivers/input/serio/i8042.c +4 -2
diff -Nru a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
@@ -598,8 +598,10 @@
 	
 	if (i8042_command(&param, I8042_CMD_AUX_DISABLE))
 		return -1;
-	if (i8042_command(&param, I8042_CMD_CTL_RCTR) || (~param & I8042_CTR_AUXDIS))
-		return -1;	
+	if (i8042_command(&param, I8042_CMD_CTL_RCTR) || (~param & I8042_CTR_AUXDIS)) {
+		printk(KERN_WARNING "Failed to disable AUX port, but continuing anyway... Is this a SiS?\n");
+		printk(KERN_WARNING "If AUX port is really absent please use the 'i8042.noaux' option.\n");
+	}
 
 	if (i8042_command(&param, I8042_CMD_AUX_ENABLE))
 		return -1;
#9 lore raw

Re: [PATCH 6/7] Kconfig Synaptics help

In reply to Dmitry Torokhov

===================================================================

[email protected], 2004-01-03 02:49:55-05:00, [email protected]
Input: Kconfig help section update -
Suggest psmouse.proto=imps option to Synaptics users who do not want installing native XFree driver but want tapping work

 Kconfig |    2 ++
 1 files changed, 2 insertions(+)

===================================================================

drivers/input/mouse/Kconfig +2 -0
diff -Nru a/drivers/input/mouse/Kconfig b/drivers/input/mouse/Kconfig
@@ -29,6 +29,8 @@
 	  and a new verion of GPM at:
 		http://www.geocities.com/dt_or/gpm/gpm.html
 	  to take advantage of the advanced features of the touchpad.
+	  If you do not want install specialized drivers but want tapping
+	  working please use option psmouse.proto=imps.
 
 	  If unsure, say Y.
 
#10 lore raw

Re: [PATCH 5/7] missing module licenses

In reply to Dmitry Torokhov

===================================================================

[email protected], 2004-01-03 02:47:21-05:00, [email protected]
Input: Add missing MODULE_LICENSEs

 maple_keyb.c |    1 +
 newtonkbd.c  |    2 ++
 2 files changed, 3 insertions(+)

===================================================================

drivers/input/keyboard/maple_keyb.c +1 -0
diff -Nru a/drivers/input/keyboard/maple_keyb.c b/drivers/input/keyboard/maple_keyb.c
@@ -14,6 +14,7 @@
 
 MODULE_AUTHOR("YAEGASHI Takeshi <[email protected]>");
 MODULE_DESCRIPTION("SEGA Dreamcast keyboard driver");
+MODULE_LICENSE("GPL");
 
 static unsigned char dc_kbd_keycode[256] = {
 	  0,  0,  0,  0, 30, 48, 46, 32, 18, 33, 34, 35, 23, 36, 37, 38,
drivers/input/keyboard/newtonkbd.c +2 -0
diff -Nru a/drivers/input/keyboard/newtonkbd.c b/drivers/input/keyboard/newtonkbd.c
@@ -33,6 +33,8 @@
 #include <linux/serio.h>
 
 MODULE_AUTHOR("Justin Cormack <[email protected]>");
+MODULE_DESCRIPTION("Newton keyboard driver");
+MODULE_LICENSE("GPL");
 
 #define NKBD_KEY	0x7f
 #define NKBD_PRESS	0x80
#11 lore raw

Re: [PATCH 3/7] psmouse option parsing

In reply to Dmitry Torokhov

Documentation/kernel-parameters.txt line 811

Quoted 2 lines · Dmitry Torokhov
Documentation/kernel-parameters.txt +2 -0
+			[HW,MOUSE] Controls Logitech smartscroll autoreteat,
+			0 = disabled, 1 = enabled (default). 

Ha, a typo. :)

Signature · 2 lines
Vojtech Pavlik
SuSE Labs, SuSE CR
#12 lore raw

Re: [PATCH 3/7] psmouse option parsing

Quoted 5 lines · Vojtech Pavlik

Review

Quoted 2 lines · Dmitry Torokhov
(quoted diff) +2 -0
+			[HW,MOUSE] Controls Logitech smartscroll autoreteat,
+			0 = disabled, 1 = enabled (default).

Ha, a typo. :)

Darn! :)

Sorry about that. I uploaded hand-corrected patch to

http://www.geocities.co/dt_or/input/2_6_0-rc1/

and also sending it here for your reference.

Dmitry

===================================================================

[email protected], 2004-01-02 03:02:35-05:00, [email protected]
Input: With Vojtech's approval adjusted psmouse option names by
dropping psmouse_ prefix.

If psmouse is compiled as a module new option names are:
proto, rate, resetafter, resolution, smartscroll

If psmouse is built in the kernel the prefix "psmouse." is required in front of an option, like "psmouse.proto"

Also, since we are changing all names, killed psmouse_noext completely

 Documentation/kernel-parameters.txt |   12 +++++++++---
 drivers/input/mouse/psmouse-base.c  |   30 ++++++++++--------------------
 2 files changed, 19 insertions(+), 23 deletions(-)

===================================================================

Documentation/kernel-parameters.txt +9 -3
diff -Nru a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
@@ -797,12 +797,18 @@
 			before loading.
 			See Documentation/ramdisk.txt.
 
-	psmouse_proto=  [HW,MOUSE] Highest PS2 mouse protocol extension to
+	psmouse.proto=  [HW,MOUSE] Highest PS2 mouse protocol extension to
 			probe for (bare|imps|exps).
-
-	psmouse_resetafter=
+	psmouse.rate=	[HW,MOUSE] Set desired mouse report rate, in reports
+			per second.
+	psmouse.resetafter=
 			[HW,MOUSE] Try to reset Synaptics Touchpad after so many
 			bad packets (0 = never).
+	psmouse.resolution=
+			[HW,MOUSE] Set desired mouse resolution, in dpi.
+	psmouse.smartscroll=
+			[HW,MOUSE] Controls Logitech smartscroll autorepeat,
+			0 = disabled, 1 = enabled (default). 
 
 	pss=		[HW,OSS] Personal Sound System (ECHO ESC614)
 			Format: <io>,<mss_io>,<mss_irq>,<mss_dma>,<mpu_io>,<mpu_irq>
drivers/input/mouse/psmouse-base.c +10 -20
diff -Nru a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
@@ -35,30 +35,26 @@
 MODULE_DESCRIPTION("PS/2 mouse driver");
 MODULE_LICENSE("GPL");
 
-static int psmouse_noext;
-module_param(psmouse_noext, int, 0);
-MODULE_PARM_DESC(psmouse_noext, "[DEPRECATED] Disable any protocol extensions. Useful for KVM switches.");
-
 static char *psmouse_proto;
 static unsigned int psmouse_max_proto = -1U;
-module_param(psmouse_proto, charp, 0);
-MODULE_PARM_DESC(psmouse_proto, "Highest protocol extension to probe (bare, imps, exps). Useful for KVM switches.");
+module_param_named(proto, psmouse_proto, charp, 0);
+MODULE_PARM_DESC(proto, "Highest protocol extension to probe (bare, imps, exps). Useful for KVM switches.");
 
 int psmouse_resolution = 200;
-module_param(psmouse_resolution, uint, 0);
-MODULE_PARM_DESC(psmouse_resolution, "Resolution, in dpi.");
+module_param_named(resolution, psmouse_resolution, uint, 0);
+MODULE_PARM_DESC(resolution, "Resolution, in dpi.");
 
 unsigned int psmouse_rate = 100;
-module_param(psmouse_rate, uint, 0);
-MODULE_PARM_DESC(psmouse_rate, "Report rate, in reports per second.");
+module_param_named(rate, psmouse_rate, uint, 0);
+MODULE_PARM_DESC(rate, "Report rate, in reports per second.");
 
 int psmouse_smartscroll = 1;
-module_param(psmouse_smartscroll, bool, 0);
-MODULE_PARM_DESC(psmouse_smartscroll, "Logitech Smartscroll autorepeat, 1 = enabled (default), 0 = disabled.");
+module_param_named(smartscroll, psmouse_smartscroll, bool, 0);
+MODULE_PARM_DESC(smartscroll, "Logitech Smartscroll autorepeat, 1 = enabled (default), 0 = disabled.");
 
 unsigned int psmouse_resetafter;
-module_param(psmouse_resetafter, uint, 0);
-MODULE_PARM_DESC(psmouse_resetafter, "Reset Synaptics Touchpad after so many bad packets (0 = never).");
+module_param_named(resetafter, psmouse_resetafter, uint, 0);
+MODULE_PARM_DESC(resetafter, "Reset Synaptics Touchpad after so many bad packets (0 = never).");
 
 static char *psmouse_protocols[] = { "None", "PS/2", "PS2++", "PS2T++", "GenPS/2", "ImPS/2", "ImExPS/2", "SynPS/2"};
 
@@ -674,12 +670,6 @@
 
 static inline void psmouse_parse_proto(void)
 {
-	if (psmouse_noext) {
-		printk(KERN_WARNING "psmouse: 'psmouse_noext' option is deprecated, please use 'psmouse_proto'\n");
-		psmouse_max_proto = PSMOUSE_PS2;
-	}
-
-	/* even is psmouse_noext is present psmouse_proto overrides it */
 	if (psmouse_proto) {
 		if (!strcmp(psmouse_proto, "bare"))
 			psmouse_max_proto = PSMOUSE_PS2;
#13 lore raw

Re: [PATCH 3/7] psmouse option parsing

Quoted 9 lines · Dmitry Torokhov
Quoted 5 lines · Vojtech Pavlik

Review

Quoted 2 lines · Dmitry Torokhov
(quoted diff) +2 -0
+			[HW,MOUSE] Controls Logitech smartscroll autoreteat,
+			0 = disabled, 1 = enabled (default).

Ha, a typo. :)

Darn! :)

Quoted 7 lines

Sorry about that. I uploaded hand-corrected patch to

http://www.geocities.co/dt_or/input/2_6_0-rc1/

and also sending it here for your reference.

Dmitry

Patch is OK now. The first (i8042 reset) patch is also OK, I misread it when I thought I've found problems there.

Andrew, please apply these patches to your tree and/or schedule them for inclusion into mainline.

Good work, Dmitry!

Signature · 2 lines
Vojtech Pavlik
SuSE Labs, SuSE CR
#14 lore raw

Re: [PATCH 3/7] psmouse option parsing

In reply to Dmitry Torokhov
Quoted 9 lines · Dmitry Torokhov
Quoted 5 lines · Vojtech Pavlik

Review

Quoted 2 lines · Dmitry Torokhov
(quoted diff) +2 -0
+			[HW,MOUSE] Controls Logitech smartscroll autoreteat,
+			0 = disabled, 1 = enabled (default).

Ha, a typo. :)

Darn! :)

Quoted 7 lines

Sorry about that. I uploaded hand-corrected patch to

http://www.geocities.co/dt_or/input/2_6_0-rc1/

and also sending it here for your reference.

Dmitry

Patch is OK now. The first (i8042 reset) patch is also OK, I misread it when I thought I've found problems there.

Andrew, please apply these patches to your tree and/or schedule them for inclusion into mainline.

Good work, Dmitry!

Signature · 2 lines
Vojtech Pavlik
SuSE Labs, SuSE CR
#15 lore raw

Re: [PATCH 3/7] psmouse option parsing

In reply to Vojtech Pavlik
Quoted 5 lines · Vojtech Pavlik

Review

Quoted 2 lines · Dmitry Torokhov
(quoted diff) +2 -0
+			[HW,MOUSE] Controls Logitech smartscroll autoreteat,
+			0 = disabled, 1 = enabled (default).

Ha, a typo. :)

Darn! :)

Sorry about that. I uploaded hand-corrected patch to

http://www.geocities.co/dt_or/input/2_6_0-rc1/

and also sending it here for your reference.

Dmitry

===================================================================

[email protected], 2004-01-02 03:02:35-05:00, [email protected]
Input: With Vojtech's approval adjusted psmouse option names by
dropping psmouse_ prefix.

If psmouse is compiled as a module new option names are:
proto, rate, resetafter, resolution, smartscroll

If psmouse is built in the kernel the prefix "psmouse." is required in front of an option, like "psmouse.proto"

Also, since we are changing all names, killed psmouse_noext completely

 Documentation/kernel-parameters.txt |   12 +++++++++---
 drivers/input/mouse/psmouse-base.c  |   30 ++++++++++--------------------
 2 files changed, 19 insertions(+), 23 deletions(-)

===================================================================

Documentation/kernel-parameters.txt +9 -3
diff -Nru a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
@@ -797,12 +797,18 @@
 			before loading.
 			See Documentation/ramdisk.txt.
 
-	psmouse_proto=  [HW,MOUSE] Highest PS2 mouse protocol extension to
+	psmouse.proto=  [HW,MOUSE] Highest PS2 mouse protocol extension to
 			probe for (bare|imps|exps).
-
-	psmouse_resetafter=
+	psmouse.rate=	[HW,MOUSE] Set desired mouse report rate, in reports
+			per second.
+	psmouse.resetafter=
 			[HW,MOUSE] Try to reset Synaptics Touchpad after so many
 			bad packets (0 = never).
+	psmouse.resolution=
+			[HW,MOUSE] Set desired mouse resolution, in dpi.
+	psmouse.smartscroll=
+			[HW,MOUSE] Controls Logitech smartscroll autorepeat,
+			0 = disabled, 1 = enabled (default). 
 
 	pss=		[HW,OSS] Personal Sound System (ECHO ESC614)
 			Format: <io>,<mss_io>,<mss_irq>,<mss_dma>,<mpu_io>,<mpu_irq>
drivers/input/mouse/psmouse-base.c +10 -20
diff -Nru a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
@@ -35,30 +35,26 @@
 MODULE_DESCRIPTION("PS/2 mouse driver");
 MODULE_LICENSE("GPL");
 
-static int psmouse_noext;
-module_param(psmouse_noext, int, 0);
-MODULE_PARM_DESC(psmouse_noext, "[DEPRECATED] Disable any protocol extensions. Useful for KVM switches.");
-
 static char *psmouse_proto;
 static unsigned int psmouse_max_proto = -1U;
-module_param(psmouse_proto, charp, 0);
-MODULE_PARM_DESC(psmouse_proto, "Highest protocol extension to probe (bare, imps, exps). Useful for KVM switches.");
+module_param_named(proto, psmouse_proto, charp, 0);
+MODULE_PARM_DESC(proto, "Highest protocol extension to probe (bare, imps, exps). Useful for KVM switches.");
 
 int psmouse_resolution = 200;
-module_param(psmouse_resolution, uint, 0);
-MODULE_PARM_DESC(psmouse_resolution, "Resolution, in dpi.");
+module_param_named(resolution, psmouse_resolution, uint, 0);
+MODULE_PARM_DESC(resolution, "Resolution, in dpi.");
 
 unsigned int psmouse_rate = 100;
-module_param(psmouse_rate, uint, 0);
-MODULE_PARM_DESC(psmouse_rate, "Report rate, in reports per second.");
+module_param_named(rate, psmouse_rate, uint, 0);
+MODULE_PARM_DESC(rate, "Report rate, in reports per second.");
 
 int psmouse_smartscroll = 1;
-module_param(psmouse_smartscroll, bool, 0);
-MODULE_PARM_DESC(psmouse_smartscroll, "Logitech Smartscroll autorepeat, 1 = enabled (default), 0 = disabled.");
+module_param_named(smartscroll, psmouse_smartscroll, bool, 0);
+MODULE_PARM_DESC(smartscroll, "Logitech Smartscroll autorepeat, 1 = enabled (default), 0 = disabled.");
 
 unsigned int psmouse_resetafter;
-module_param(psmouse_resetafter, uint, 0);
-MODULE_PARM_DESC(psmouse_resetafter, "Reset Synaptics Touchpad after so many bad packets (0 = never).");
+module_param_named(resetafter, psmouse_resetafter, uint, 0);
+MODULE_PARM_DESC(resetafter, "Reset Synaptics Touchpad after so many bad packets (0 = never).");
 
 static char *psmouse_protocols[] = { "None", "PS/2", "PS2++", "PS2T++", "GenPS/2", "ImPS/2", "ImExPS/2", "SynPS/2"};
 
@@ -674,12 +670,6 @@
 
 static inline void psmouse_parse_proto(void)
 {
-	if (psmouse_noext) {
-		printk(KERN_WARNING "psmouse: 'psmouse_noext' option is deprecated, please use 'psmouse_proto'\n");
-		psmouse_max_proto = PSMOUSE_PS2;
-	}
-
-	/* even is psmouse_noext is present psmouse_proto overrides it */
 	if (psmouse_proto) {
 		if (!strcmp(psmouse_proto, "bare"))
 			psmouse_max_proto = PSMOUSE_PS2;
#16 lore raw

Re: [PATCH 3/7] psmouse option parsing

In reply to Dmitry Torokhov

Documentation/kernel-parameters.txt line 811

Quoted 2 lines · Dmitry Torokhov
Documentation/kernel-parameters.txt +2 -0
+			[HW,MOUSE] Controls Logitech smartscroll autoreteat,
+			0 = disabled, 1 = enabled (default). 

Ha, a typo. :)

Signature · 2 lines
Vojtech Pavlik
SuSE Labs, SuSE CR
#17 lore raw

Re: [PATCH 4/7] atkbd option parsing

In reply to Dmitry Torokhov

===================================================================

[email protected], 2004-01-03 02:45:27-05:00, [email protected]
Input: converted atkbd to the new style of option parsing.
If compiled as a module new option names are:
set, softrepeat, reset.
If built into the kernel options must be prepended with "atkbd." prefix, like "atkbd.softrepeat"

 Documentation/kernel-parameters.txt |    7 +++---
 drivers/input/keyboard/atkbd.c      |   40 ++++++++----------------------------
 2 files changed, 13 insertions(+), 34 deletions(-)

===================================================================

Documentation/kernel-parameters.txt +4 -3
diff -Nru a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
@@ -153,10 +153,11 @@
 
 	atascsi=	[HW,SCSI] Atari SCSI
 
-	atkbd_set=	[HW] Select keyboard code set
+	atkbd.set=	[HW] Select keyboard code set
 			Format: <int>
-
-	atkbd_reset	[HW] Reset keyboard during initialization
+	atkbd.softrepeat=
+			[HW] Use software keyboard repeat
+	atkbd.reset=	[HW] Reset keyboard during initialization
 
 	autotest	[IA64]
 
drivers/input/keyboard/atkbd.c +9 -31
diff -Nru a/drivers/input/keyboard/atkbd.c b/drivers/input/keyboard/atkbd.c
@@ -19,6 +19,7 @@
 
 #include <linux/delay.h>
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/slab.h>
 #include <linux/interrupt.h>
 #include <linux/init.h>
@@ -29,18 +30,23 @@
 
 MODULE_AUTHOR("Vojtech Pavlik <[email protected]>");
 MODULE_DESCRIPTION("AT and PS/2 keyboard driver");
-MODULE_PARM(atkbd_set, "1i");
-MODULE_PARM(atkbd_reset, "1i");
-MODULE_PARM(atkbd_softrepeat, "1i");
 MODULE_LICENSE("GPL");
 
 static int atkbd_set = 2;
+module_param_named(set, atkbd_set, int, 0);
+MODULE_PARM_DESC(set, "Select keyboard code set (2 = default, 3, 4)");
+
 #if defined(__i386__) || defined (__x86_64__)
 static int atkbd_reset;
 #else
 static int atkbd_reset = 1;
 #endif
+module_param_named(reset, atkbd_reset, bool, 0);
+MODULE_PARM_DESC(reset, "Reset keyboard during initialization");
+
 static int atkbd_softrepeat;
+module_param_named(softrepeat, atkbd_softrepeat, bool, 0);
+MODULE_PARM_DESC(softrepeat, "Use software keyboard repeat");
 
 /*
  * Scancode to keycode tables. These are just the default setting, and
@@ -759,34 +765,6 @@
 	.disconnect =	atkbd_disconnect,
 	.cleanup =	atkbd_cleanup,
 };
-
-#ifndef MODULE
-static int __init atkbd_setup_set(char *str)
-{
-        int ints[4];
-        str = get_options(str, ARRAY_SIZE(ints), ints);
-        if (ints[0] > 0) atkbd_set = ints[1];
-        return 1;
-}
-static int __init atkbd_setup_reset(char *str)
-{
-        int ints[4];
-        str = get_options(str, ARRAY_SIZE(ints), ints);
-        if (ints[0] > 0) atkbd_reset = ints[1];
-        return 1;
-}
-static int __init atkbd_setup_softrepeat(char *str)
-{
-        int ints[4];
-        str = get_options(str, ARRAY_SIZE(ints), ints);
-        if (ints[0] > 0) atkbd_softrepeat = ints[1];
-        return 1;
-}
-
-__setup("atkbd_set=", atkbd_setup_set);
-__setup("atkbd_reset", atkbd_setup_reset);
-__setup("atkbd_softrepeat=", atkbd_setup_softrepeat);
-#endif
 
 int __init atkbd_init(void)
 {
#18 lore raw

Re: [PATCH 3/7] psmouse option parsing

In reply to Dmitry Torokhov

===================================================================

[email protected], 2004-01-02 03:02:35-05:00, [email protected]
Input: With Vojtech's approval adjusted psmouse option names by
dropping psmouse_ prefix.

If psmouse is compiled as a module new option names are:
proto, rate, resetafter, resolution, smartscroll

If psmouse is built in the kernel the prefix "psmouse." is required in front of an option, like "psmouse.proto"

Also, since we are changing all names, killed psmouse_noext completely

 Documentation/kernel-parameters.txt |   12 +++++++++---
 drivers/input/mouse/psmouse-base.c  |   30 ++++++++++--------------------
 2 files changed, 19 insertions(+), 23 deletions(-)

===================================================================

Documentation/kernel-parameters.txt +9 -3
diff -Nru a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
@@ -797,12 +797,18 @@
 			before loading.
 			See Documentation/ramdisk.txt.
 
-	psmouse_proto=  [HW,MOUSE] Highest PS2 mouse protocol extension to
+	psmouse.proto=  [HW,MOUSE] Highest PS2 mouse protocol extension to
 			probe for (bare|imps|exps).
-
-	psmouse_resetafter=
+	psmouse.rate=	[HW,MOUSE] Set desired mouse report rate, in reports
+			per second.
+	psmouse.resetafter=
 			[HW,MOUSE] Try to reset Synaptics Touchpad after so many
 			bad packets (0 = never).
+	psmouse.resolution=
+			[HW,MOUSE] Set desired mouse resolution, in dpi.
+	psmouse.smartscroll=
+			[HW,MOUSE] Controls Logitech smartscroll autoreteat,
+			0 = disabled, 1 = enabled (default). 
 
 	pss=		[HW,OSS] Personal Sound System (ECHO ESC614)
 			Format: <io>,<mss_io>,<mss_irq>,<mss_dma>,<mpu_io>,<mpu_irq>
drivers/input/mouse/psmouse-base.c +10 -20
diff -Nru a/drivers/input/mouse/psmouse-base.c b/drivers/input/mouse/psmouse-base.c
@@ -35,30 +35,26 @@
 MODULE_DESCRIPTION("PS/2 mouse driver");
 MODULE_LICENSE("GPL");
 
-static int psmouse_noext;
-module_param(psmouse_noext, int, 0);
-MODULE_PARM_DESC(psmouse_noext, "[DEPRECATED] Disable any protocol extensions. Useful for KVM switches.");
-
 static char *psmouse_proto;
 static unsigned int psmouse_max_proto = -1U;
-module_param(psmouse_proto, charp, 0);
-MODULE_PARM_DESC(psmouse_proto, "Highest protocol extension to probe (bare, imps, exps). Useful for KVM switches.");
+module_param_named(proto, psmouse_proto, charp, 0);
+MODULE_PARM_DESC(proto, "Highest protocol extension to probe (bare, imps, exps). Useful for KVM switches.");
 
 int psmouse_resolution = 200;
-module_param(psmouse_resolution, uint, 0);
-MODULE_PARM_DESC(psmouse_resolution, "Resolution, in dpi.");
+module_param_named(resolution, psmouse_resolution, uint, 0);
+MODULE_PARM_DESC(resolution, "Resolution, in dpi.");
 
 unsigned int psmouse_rate = 100;
-module_param(psmouse_rate, uint, 0);
-MODULE_PARM_DESC(psmouse_rate, "Report rate, in reports per second.");
+module_param_named(rate, psmouse_rate, uint, 0);
+MODULE_PARM_DESC(rate, "Report rate, in reports per second.");
 
 int psmouse_smartscroll = 1;
-module_param(psmouse_smartscroll, bool, 0);
-MODULE_PARM_DESC(psmouse_smartscroll, "Logitech Smartscroll autorepeat, 1 = enabled (default), 0 = disabled.");
+module_param_named(smartscroll, psmouse_smartscroll, bool, 0);
+MODULE_PARM_DESC(smartscroll, "Logitech Smartscroll autorepeat, 1 = enabled (default), 0 = disabled.");
 
 unsigned int psmouse_resetafter;
-module_param(psmouse_resetafter, uint, 0);
-MODULE_PARM_DESC(psmouse_resetafter, "Reset Synaptics Touchpad after so many bad packets (0 = never).");
+module_param_named(resetafter, psmouse_resetafter, uint, 0);
+MODULE_PARM_DESC(resetafter, "Reset Synaptics Touchpad after so many bad packets (0 = never).");
 
 static char *psmouse_protocols[] = { "None", "PS/2", "PS2++", "PS2T++", "GenPS/2", "ImPS/2", "ImExPS/2", "SynPS/2"};
 
@@ -674,12 +670,6 @@
 
 static inline void psmouse_parse_proto(void)
 {
-	if (psmouse_noext) {
-		printk(KERN_WARNING "psmouse: 'psmouse_noext' option is deprecated, please use 'psmouse_proto'\n");
-		psmouse_max_proto = PSMOUSE_PS2;
-	}
-
-	/* even is psmouse_noext is present psmouse_proto overrides it */
 	if (psmouse_proto) {
 		if (!strcmp(psmouse_proto, "bare"))
 			psmouse_max_proto = PSMOUSE_PS2;
#19 lore raw

Re: [PATCH 1/7] i8042 suspend

In reply to Dmitry Torokhov
Quoted 7 lines · Dmitry Torokhov

diff -Nru a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c

drivers/input/serio/i8042.c +0 -0
@@ -746,6 +746,29 @@
 
 
 /*

drivers/input/serio/i8042.c line 758

Quoted 10 lines
drivers/input/serio/i8042.c +10 -0
+ * Reset the controller.
+ */
+void i8042_controller_reset(void)
+{
+	if (i8042_reset) {
+		unsigned char param;
+
+		if (i8042_command(&param, I8042_CMD_CTL_TEST))
+			printk(KERN_ERR "i8042.c: i8042 controller reset timeout.\n");
+	}

We should be checking the return value from the TEST command as well, if we want to use this to initialize the controller on non-x86 platforms (where i8042.reset is 0).

drivers/input/serio/i8042.c line 782

Quoted 13 lines
drivers/input/serio/i8042.c +2 -9
-/*
- * Reset the controller.
- */
-
-	if (i8042_reset) {
-		unsigned char param;
+	i8042_controller_reset();
+}
 
-		if (i8042_command(&param, I8042_CMD_CTL_TEST))
-			printk(KERN_ERR "i8042.c: i8042 controller reset timeout.\n");
-	}

This actually introduces a bug, because we don't want to restore the CTR setting before we save it, which the new code does.

drivers/input/serio/i8042.c line 829

Quoted 6 lines
drivers/input/serio/i8042.c +1 -1
@@ -809,7 +826,7 @@
 	if (i8042_mux_present)
 		if (i8042_enable_mux_mode(&i8042_aux_values, NULL) ||
 		    i8042_enable_mux_ports(&i8042_aux_values)) {
-			printk(KERN_WARNING "i8042: failed to resume active multiplexor, mouse won't wotk.\n");
+			printk(KERN_WARNING "i8042: failed to resume active multiplexor, mouse won't work.\n");

Ahh, a typo. :)

Signature · 2 lines
Vojtech Pavlik
SuSE Labs, SuSE CR
#20 lore raw

Re: [PATCH 1/7] i8042 suspend

Quoted 32 lines · Vojtech Pavlik
Quoted 7 lines · Dmitry Torokhov

diff -Nru a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c

drivers/input/serio/i8042.c +0 -0
@@ -746,6 +746,29 @@
 
 
 /*

drivers/input/serio/i8042.c line 758

Quoted 10 lines
drivers/input/serio/i8042.c +10 -0
+ * Reset the controller.
+ */
+void i8042_controller_reset(void)
+{
+	if (i8042_reset) {
+		unsigned char param;
+
+		if (i8042_command(&param, I8042_CMD_CTL_TEST))
+			printk(KERN_ERR "i8042.c: i8042 controller reset timeout.\n");
+	}

We should be checking the return value from the TEST command as well, if we want to use this to initialize the controller on non-x86 platforms (where i8042.reset is 0).

Quoted 9 lines
drivers/input/serio/i8042.c +2 -6
-/*
- * Reset the controller.
- */
-
-	if (i8042_reset) {
-		unsigned char param;
+	i8042_controller_reset();
+}
Quoted 7 lines

drivers/input/serio/i8042.c line 782

Quoted 3 lines
drivers/input/serio/i8042.c +0 -3
-		if (i8042_command(&param, I8042_CMD_CTL_TEST))
-			printk(KERN_ERR "i8042.c: i8042 controller reset timeout.\n");
-	}

This actually introduces a bug, because we don't want to restore the CTR setting before we save it, which the new code does.

Hmm, I do not see it. i8042_controller_reset() is only called on suspend/ shutdown. The init path where we vigorously testing the hardware and saving initial CTR value was left intact.

As far as checking the return value we usualy give some leniency on suspend/ shutdown and don't fail the entire process when there are non-clitical errors.

Or am I missing something?

Dmitry

#21 lore raw

Re: [PATCH 1/7] i8042 suspend

In reply to Vojtech Pavlik
Quoted 32 lines · Vojtech Pavlik
Quoted 7 lines · Dmitry Torokhov

diff -Nru a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c

drivers/input/serio/i8042.c +0 -0
@@ -746,6 +746,29 @@
 
 
 /*

drivers/input/serio/i8042.c line 758

Quoted 10 lines
drivers/input/serio/i8042.c +10 -0
+ * Reset the controller.
+ */
+void i8042_controller_reset(void)
+{
+	if (i8042_reset) {
+		unsigned char param;
+
+		if (i8042_command(&param, I8042_CMD_CTL_TEST))
+			printk(KERN_ERR "i8042.c: i8042 controller reset timeout.\n");
+	}

We should be checking the return value from the TEST command as well, if we want to use this to initialize the controller on non-x86 platforms (where i8042.reset is 0).

Quoted 9 lines
drivers/input/serio/i8042.c +2 -6
-/*
- * Reset the controller.
- */
-
-	if (i8042_reset) {
-		unsigned char param;
+	i8042_controller_reset();
+}
Quoted 7 lines

drivers/input/serio/i8042.c line 782

Quoted 3 lines
drivers/input/serio/i8042.c +0 -3
-		if (i8042_command(&param, I8042_CMD_CTL_TEST))
-			printk(KERN_ERR "i8042.c: i8042 controller reset timeout.\n");
-	}

This actually introduces a bug, because we don't want to restore the CTR setting before we save it, which the new code does.

Hmm, I do not see it. i8042_controller_reset() is only called on suspend/ shutdown. The init path where we vigorously testing the hardware and saving initial CTR value was left intact.

As far as checking the return value we usualy give some leniency on suspend/ shutdown and don't fail the entire process when there are non-clitical errors.

Or am I missing something?

Dmitry

#22 lore raw

Re: [PATCH 1/7] i8042 suspend

In reply to Dmitry Torokhov
Quoted 11 lines · Dmitry Torokhov

===================================================================

[email protected], 2004-01-02 00:22:32-05:00, [email protected]
Input: Add suspend methods to restore original controller state
on suspend as some BIOS don't like the state we leave it in. Also synchroniously delete the polling timer on module exit.

 i8042.c |   76 +++++++++++++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 54 insertions(+), 22 deletions(-)

Anyone know what the state of this patch is? I notice that the 2.6-merged i8042.c still doesn't disable the polling timer on suspend.

Signature · 4 lines
Russell King
 Linux kernel    2.6 ARM Linux   - http://www.arm.linux.org.uk/
 maintainer of:  2.6 PCMCIA      - http://pcmcia.arm.linux.org.uk/
                 2.6 Serial core
#23 lore raw

Re: [PATCH 1/7] i8042 suspend

Quoted 10 lines · Russell King
Quoted 9 lines · Dmitry Torokhov

===================================================================

[email protected], 2004-01-02 00:22:32-05:00, [email protected]
Input: Add suspend methods to restore original controller state
on suspend as some BIOS don't like the state we leave it in. Also synchroniously delete the polling timer on module exit.

Quoted 6 lines
Quoted 3 lines
 i8042.c |   76

+++++++++++++++++++++++++++++++++++++++++++++------------------- 1 files changed, 54 insertions(+), 22 deletions(-)

Anyone know what the state of this patch is? I notice that the 2.6-merged i8042.c still doesn't disable the polling timer on suspend.

I believe it's in latest -mm and Andrew was going to push it to Linus.

Signature · 1 line
Dmitry
#24 lore raw

Re: [PATCH 2/7] i8042 option parsing

In reply to Dmitry Torokhov

===================================================================

[email protected], 2004-01-02 02:46:43-05:00, [email protected]
Input: With Vojtech's approval adjusted i8042 option names by
dropping i8042_ prefix.

If i8042 is compiled as a module new option names are:
direct, dumbkbd, noaux, nomux, reset, unlock

If i8042 is build in the kernel the prefix "i8042." is required in front of an option, like "i8042.reset"

 Documentation/kernel-parameters.txt |   16 +++++++++-------
 drivers/input/serio/i8042.c         |   18 ++++++++++++------
 2 files changed, 21 insertions(+), 13 deletions(-)

===================================================================

Documentation/kernel-parameters.txt +9 -7
diff -Nru a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
@@ -372,13 +372,15 @@
 
 	noirqbalance	[IA-32,SMP,KNL] Disable kernel irq balancing
 
-	i8042_direct	[HW] Keyboard has been put into non-translated mode 
-			by BIOS
-	i8042_dumbkbd	[HW] Don't attempt to blink the leds
-	i8042_noaux	[HW] Don't check for auxiliary (== mouse) port
-	i8042_nomux
-	i8042_reset	[HW] Reset the controller during init and cleanup
-	i8042_unlock	[HW] Unlock (ignore) the keylock
+	i8042.direct	[HW] Put keyboard port into non-translated mode 
+	i8042.dumbkbd	[HW] Pretend that controlled can only read data from
+			     keyboard and can not control its state
+			     (Don't attempt to blink the leds)
+	i8042.noaux	[HW] Don't check for auxiliary (== mouse) port
+	i8042.nomux	[HW] Don't check presence of an active multiplexing
+			     controller
+	i8042.reset	[HW] Reset the controller during init and cleanup
+	i8042.unlock	[HW] Unlock (ignore) the keylock
 
 	i810=		[HW,DRM]
 
drivers/input/serio/i8042.c +12 -6
diff -Nru a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
@@ -29,22 +29,28 @@
 MODULE_LICENSE("GPL");
 
 static unsigned int i8042_noaux;
-module_param(i8042_noaux, bool, 0);
+module_param_named(noaux, i8042_noaux, bool, 0);
+MODULE_PARM_DESC(noaux, "Do not probe or use AUX (mouse) port.");
 
 static unsigned int i8042_nomux;
-module_param(i8042_nomux, bool, 0);
+module_param_named(nomux, i8042_nomux, bool, 0);
+MODULE_PARM_DESC(nomux, "Do not check whether an active multiplexing conrtoller is present.");
 
 static unsigned int i8042_unlock;
-module_param(i8042_unlock, bool, 0);
+module_param_named(unlock, i8042_unlock, bool, 0);
+MODULE_PARM_DESC(unlock, "Ignore keyboard lock.");
 
 static unsigned int i8042_reset;
-module_param(i8042_reset, bool, 0);
+module_param_named(reset, i8042_reset, bool, 0);
+MODULE_PARM_DESC(reset, "Reset controller during init and cleanup.");
 
 static unsigned int i8042_direct;
-module_param(i8042_direct, bool, 0);
+module_param_named(direct, i8042_direct, bool, 0);
+MODULE_PARM_DESC(direct, "Put keyboard port into non-translated mode.");
 
 static unsigned int i8042_dumbkbd;
-module_param(i8042_dumbkbd, bool, 0);
+module_param_named(dumbkbd, i8042_dumbkbd, bool, 0);
+MODULE_PARM_DESC(dumbkbd, "Pretend that controller can only read data from keyboard");
 
 #undef DEBUG
 #include "i8042.h"
#25 lore raw

Re: [PATCH 1/7] i8042 suspend

In reply to Dmitry Torokhov
Quoted 7 lines · Dmitry Torokhov

diff -Nru a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c

drivers/input/serio/i8042.c +0 -0
@@ -746,6 +746,29 @@
 
 
 /*

drivers/input/serio/i8042.c line 758

Quoted 10 lines
drivers/input/serio/i8042.c +10 -0
+ * Reset the controller.
+ */
+void i8042_controller_reset(void)
+{
+	if (i8042_reset) {
+		unsigned char param;
+
+		if (i8042_command(&param, I8042_CMD_CTL_TEST))
+			printk(KERN_ERR "i8042.c: i8042 controller reset timeout.\n");
+	}

We should be checking the return value from the TEST command as well, if we want to use this to initialize the controller on non-x86 platforms (where i8042.reset is 0).

drivers/input/serio/i8042.c line 782

Quoted 13 lines
drivers/input/serio/i8042.c +2 -9
-/*
- * Reset the controller.
- */
-
-	if (i8042_reset) {
-		unsigned char param;
+	i8042_controller_reset();
+}
 
-		if (i8042_command(&param, I8042_CMD_CTL_TEST))
-			printk(KERN_ERR "i8042.c: i8042 controller reset timeout.\n");
-	}

This actually introduces a bug, because we don't want to restore the CTR setting before we save it, which the new code does.

drivers/input/serio/i8042.c line 829

Quoted 6 lines
drivers/input/serio/i8042.c +1 -1
@@ -809,7 +826,7 @@
 	if (i8042_mux_present)
 		if (i8042_enable_mux_mode(&i8042_aux_values, NULL) ||
 		    i8042_enable_mux_ports(&i8042_aux_values)) {
-			printk(KERN_WARNING "i8042: failed to resume active multiplexor, mouse won't wotk.\n");
+			printk(KERN_WARNING "i8042: failed to resume active multiplexor, mouse won't work.\n");

Ahh, a typo. :)

Signature · 2 lines
Vojtech Pavlik
SuSE Labs, SuSE CR
#26 lore raw
In reply to Dmitry Torokhov
Quoted 8 lines · Dmitry Torokhov

Hi Vojtech,

I have a new set of input patches, could you take look at them?

1. i8042-suspend.patch
Add suspend methods to i8042 to restore BIOS settings on suspend and kill polling timer which sometimes prevents APM suspend

See comments.

Quoted 2 lines

2. i8042-options-parsing.patch
psmouse-options-parsing.patch

See comments.

Quoted 9 lines

atkbd-options.parsing
Complete conversion to the new way of parsing parameters. Drop "i8042_", "psmouse_" and "atkbd_" prefixes from option names when compiled as a module and require "i8042.", "psmouse." and "atkbd." prefixes if built into the kernel.

3. missing-module-license.patch
Maple and newton keyboard drivers were missing MODULE_LICENSE("GPL")

Quoted 7 lines

4. kconfig-synaptics-help.patch
Suggest psmouse.proto=imps to Synaptics users who do not want install native XFree Synaptics driver so taps would still work

5. sis-aux-port.patch
Do not ignore AUX port if chipset fails to disable it when we do probes as SiS is having trouble disabling but otherwise mouse works fine.

All patches except the first one are OK, in psmouse-options, there is a little typo.

Signature · 2 lines
Vojtech Pavlik
SuSE Labs, SuSE CR
#27 lore raw
In reply to Dmitry Torokhov

I made 3 more input patches:

- compile fix in 98busmose driver (it still had its interrupt routine returning voooid instead of irqreturn_t)
- the rest of mouse devices converted to the new way of handling kernel parameters and document them in kernel-parametes.txt
- convert tsdev module to the new way of handling kernel parameters and document them in kernle-parameters.txt.

The patches can be found at the following addresses:
http://www.geocities.com/dt_or/input/2_6_1-rc1/
http://www.geocities.com/dt_or/input/2_6_1-rc1-mm1/

Vojtech, Andrew,

are you interested in these kind of patches and should I take a stab at converting joysticks diectory as well?

Dmitry

#28 lore raw

PATCH 1/3 Fix compile error in 98busmouse.c module

===================================================================

[email protected], 2004-01-04 23:57:27-05:00, [email protected]
Input: Fix 98busmouse compile error -
have interrupt routine return IRQ_HANDLED

 98busmouse.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

===================================================================

drivers/input/mouse/98busmouse.c +4 -2
diff -Nru a/drivers/input/mouse/98busmouse.c b/drivers/input/mouse/98busmouse.c
@@ -74,7 +74,7 @@
 static int pc98bm_irq = PC98BM_IRQ;
 static int pc98bm_used = 0;
 
-static void pc98bm_interrupt(int irq, void *dev_id, struct pt_regs *regs);
+static irqreturn_t pc98bm_interrupt(int irq, void *dev_id, struct pt_regs *regs);
 
 static int pc98bm_open(struct input_dev *dev)
 {
@@ -113,7 +113,7 @@
 	},
 };
 
-static void pc98bm_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t pc98bm_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	char dx, dy;
 	unsigned char buttons;
@@ -137,6 +137,8 @@
 	input_sync(&pc98bm_dev);
 
 	outb(PC98BM_ENABLE_IRQ, PC98BM_CONTROL_PORT);
+
+	return IRQ_HANDLED;
 }
 
 #ifndef MODULE
#29 lore raw

Re: [PATCH 2/3] Convert mouse drivers to use module_param

===================================================================

[email protected], 2004-01-05 00:25:23-05:00, [email protected]
Input: convert the rest of mouse devices to the new way of
handling kernel parameters and document them in kernel-parameters.txt

 Documentation/kernel-parameters.txt |   12 ++++++++++--
 drivers/input/mouse/98busmouse.c    |   17 ++++-------------
 drivers/input/mouse/inport.c        |   19 +++++--------------
 drivers/input/mouse/logibm.c        |   17 ++++-------------
 drivers/input/mousedev.c            |   17 +++++++++--------
 5 files changed, 32 insertions(+), 50 deletions(-)

===================================================================

Documentation/kernel-parameters.txt +10 -2
diff -Nru a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
@@ -85,6 +85,9 @@
 			See header of drivers/scsi/53c7xx.c.
 			See also Documentation/scsi/ncr53c7xx.txt.
 
+	98busmouse.irq=	[HW,MOUSE] PC-9801 Bus Mouse Driver
+			Format: <irq>, default is 13
+
 	acpi=		[HW,ACPI] Advanced Configuration and Power Interface 
 			Format: { force | off | ht }
 			force -- enables ACPI for systems with default off
@@ -417,7 +420,7 @@
 
 	initrd=		[BOOT] Specify the location of the initial ramdisk
 
-	inport_irq=	[HW] Inport (ATI XL and Microsoft) busmouse driver
+	inport.irq=	[HW] Inport (ATI XL and Microsoft) busmouse driver
 			Format: <irq>
 
 	inttest=	[IA64]
@@ -465,7 +468,7 @@
 
 	lockd.tcpport=	[NFS]
 
-	logibm_irq=	[HW,MOUSE] Logitech Bus Mouse Driver
+	logibm.irq=	[HW,MOUSE] Logitech Bus Mouse Driver
 			Format: <irq>
 
 	log_buf_len=n	Sets the size of the printk ring buffer, in bytes.
@@ -564,6 +567,11 @@
 			See Documentation/video4linux/meye.txt.
 
 	mga=		[HW,DRM]
+
+	mousedev.xres	[MOUSE] Horizontal screen resolution, used for devices
+			reporting absolute coordinates, such as tablets
+	mousedev.yres	[MOUSE] Vertical screen resolution, used for devices
+			reporting absolute coordinates, such as tablets
 
 	mpu401=		[HW,OSS]
 			Format: <io>,<irq>
drivers/input/mouse/98busmouse.c +4 -13
diff -Nru a/drivers/input/mouse/98busmouse.c b/drivers/input/mouse/98busmouse.c
@@ -33,6 +33,7 @@
 
 #include <linux/config.h>
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/delay.h>
 #include <linux/ioport.h>
 #include <linux/init.h>
@@ -69,9 +70,10 @@
 
 #define PC98BM_IRQ		13
 
-MODULE_PARM(pc98bm_irq, "i");
-
 static int pc98bm_irq = PC98BM_IRQ;
+module_param_named(irq, pc98bm_irq, uint, 0);
+MODULE_PARM_DESC(irq, "IRQ number (13=default)");
+
 static int pc98bm_used = 0;
 
 static irqreturn_t pc98bm_interrupt(int irq, void *dev_id, struct pt_regs *regs);
@@ -140,17 +142,6 @@
 
 	return IRQ_HANDLED;
 }
-
-#ifndef MODULE
-static int __init pc98bm_setup(char *str)
-{
-        int ints[4];
-        str = get_options(str, ARRAY_SIZE(ints), ints);
-        if (ints[0] > 0) pc98bm_irq = ints[1];
-        return 1;
-}
-__setup("pc98bm_irq=", pc98bm_setup);
-#endif
 
 static int __init pc98bm_init(void)
 {
drivers/input/mouse/inport.c +5 -14
diff -Nru a/drivers/input/mouse/inport.c b/drivers/input/mouse/inport.c
@@ -35,6 +35,7 @@
  */
 
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/config.h>
 #include <linux/ioport.h>
 #include <linux/init.h>
@@ -80,10 +81,11 @@
 
 #define INPORT_IRQ		5
 
-MODULE_PARM(inport_irq, "i");
-
 static int inport_irq = INPORT_IRQ;
-static int inport_used = 0;
+module_param_named(irq, inport_irq, uint, 0);
+MODULE_PARM_DESC(irq, "IRQ number (5=default)");
+
+static int inport_used;
 
 static irqreturn_t inport_interrupt(int irq, void *dev_id, struct pt_regs *regs);
 
@@ -152,17 +154,6 @@
 	input_sync(&inport_dev);
 	return IRQ_HANDLED;
 }
-
-#ifndef MODULE
-static int __init inport_setup(char *str)
-{
-        int ints[4];
-        str = get_options(str, ARRAY_SIZE(ints), ints);
-        if (ints[0] > 0) inport_irq = ints[1];
-        return 1;
-}
-__setup("inport_irq=", inport_setup);
-#endif
 
 static int __init inport_init(void)
 {
drivers/input/mouse/logibm.c +4 -13
diff -Nru a/drivers/input/mouse/logibm.c b/drivers/input/mouse/logibm.c
@@ -36,6 +36,7 @@
  */
 
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/delay.h>
 #include <linux/ioport.h>
 #include <linux/init.h>
@@ -70,9 +71,10 @@
 
 #define LOGIBM_IRQ		5
 
-MODULE_PARM(logibm_irq, "i");
-
 static int logibm_irq = LOGIBM_IRQ;
+module_param_named(irq, logibm_irq, uint, 0);
+MODULE_PARM_DESC(irq, "IRQ number (5=default)");
+
 static int logibm_used = 0;
 
 static irqreturn_t logibm_interrupt(int irq, void *dev_id, struct pt_regs *regs);
@@ -141,17 +143,6 @@
 	outb(LOGIBM_ENABLE_IRQ, LOGIBM_CONTROL_PORT);
 	return IRQ_HANDLED;
 }
-
-#ifndef MODULE
-static int __init logibm_setup(char *str)
-{
-        int ints[4];
-        str = get_options(str, ARRAY_SIZE(ints), ints);
-        if (ints[0] > 0) logibm_irq = ints[1];
-        return 1;
-}
-__setup("logibm_irq=", logibm_setup);
-#endif
 
 static int __init logibm_init(void)
 {
drivers/input/mousedev.c +9 -8
diff -Nru a/drivers/input/mousedev.c b/drivers/input/mousedev.c
@@ -15,6 +15,7 @@
 #include <linux/slab.h>
 #include <linux/poll.h>
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/init.h>
 #include <linux/input.h>
 #include <linux/config.h>
@@ -38,6 +39,14 @@
 #define CONFIG_INPUT_MOUSEDEV_SCREEN_Y	768
 #endif
 
+static int xres = CONFIG_INPUT_MOUSEDEV_SCREEN_X;
+module_param(xres, uint, 0);
+MODULE_PARM_DESC(xres, "Horizontal screen resolution");
+
+static int yres = CONFIG_INPUT_MOUSEDEV_SCREEN_Y;
+module_param(yres, uint, 0);
+MODULE_PARM_DESC(yres, "Vertical screen resolution");
+
 struct mousedev {
 	int exist;
 	int open;
@@ -73,9 +82,6 @@
 static struct mousedev *mousedev_table[MOUSEDEV_MINORS];
 static struct mousedev mousedev_mix;
 
-static int xres = CONFIG_INPUT_MOUSEDEV_SCREEN_X;
-static int yres = CONFIG_INPUT_MOUSEDEV_SCREEN_Y;
-
 #define fx(i)  (list->old_x[(list->pkt_count - (i)) & 03])
 #define fy(i)  (list->old_y[(list->pkt_count - (i)) & 03])
 
@@ -582,8 +588,3 @@
 
 module_init(mousedev_init);
 module_exit(mousedev_exit);
-
-MODULE_PARM(xres, "i");
-MODULE_PARM_DESC(xres, "Horizontal screen resolution");
-MODULE_PARM(yres, "i");
-MODULE_PARM_DESC(yres, "Vertical screen resolution");
#30 lore raw

Re: [PATCH 3/3] Convert tsdev to use module_param

===================================================================

[email protected], 2004-01-05 00:36:03-05:00, [email protected]
Input: convert tsdev to the new way of handling parameters
and document them in kernel-parameters.txt

 Documentation/kernel-parameters.txt |    6 +++++-
 drivers/input/tsdev.c               |   23 +++++++++++++----------
 2 files changed, 18 insertions(+), 11 deletions(-)

===================================================================

Documentation/kernel-parameters.txt +5 -1
diff -Nru a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
@@ -37,7 +37,7 @@
 	MCA	MCA bus support is enabled.
 	MDA	MDA console support is enabled.
 	MOUSE	Appropriate mouse support is enabled.
-	MTD	MTD support is nebaled.
+	MTD	MTD support is enabled.
 	NET	Appropriate network support is enabled.
 	NFS	Appropriate NFS support is enabled.
 	OSS	OSS sound support is enabled.
@@ -57,6 +57,7 @@
 	SMP	The kernel is an SMP kernel.
 	SPARC	Sparc architecture is enabled.
 	SWSUSP	Software suspension is enabled.
+	TS	Appropriate touchscreen support is enabled.
 	USB	USB support is enabled.
 	V4L	Video For Linux support is enabled.
 	VGA	The VGA console has been enabled.
@@ -1135,6 +1136,9 @@
 	trix=		[HW,OSS] MediaTrix AudioTrix Pro
 			Format: <io>,<irq>,<dma>,<dma2>,<sb_io>,<sb_irq>,<sb_dma>,<mpu_io>,<mpu_irq>
  
+	tsdev.xres	[TS] Horizontal screen resolution.
+	tsdev.yres	[TS] Vertical screen resolution.
+
 	u14-34f=	[HW,SCSI] UltraStor 14F/34F SCSI host adapter
 			See header of drivers/scsi/u14-34f.c.
 
drivers/input/tsdev.c +13 -10
diff -Nru a/drivers/input/tsdev.c b/drivers/input/tsdev.c
@@ -34,6 +34,7 @@
 #include <linux/slab.h>
 #include <linux/poll.h>
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/init.h>
 #include <linux/input.h>
 #include <linux/major.h>
@@ -51,6 +52,18 @@
 #define CONFIG_INPUT_TSDEV_SCREEN_Y	320
 #endif
 
+MODULE_AUTHOR("James Simmons <[email protected]>");
+MODULE_DESCRIPTION("Input driver to touchscreen converter");
+MODULE_LICENSE("GPL");
+
+static int xres = CONFIG_INPUT_TSDEV_SCREEN_X;
+module_param(xres, uint, 0);
+MODULE_PARM_DESC(xres, "Horizontal screen resolution");
+
+static int yres = CONFIG_INPUT_TSDEV_SCREEN_Y;
+module_param(yres, uint, 0);
+MODULE_PARM_DESC(yres, "Vertical screen resolution");
+
 struct tsdev {
 	int exist;
 	int open;
@@ -82,9 +95,6 @@
 
 static struct tsdev *tsdev_table[TSDEV_MINORS];
 
-static int xres = CONFIG_INPUT_TSDEV_SCREEN_X;
-static int yres = CONFIG_INPUT_TSDEV_SCREEN_Y;
-
 static int tsdev_fasync(int fd, struct file *file, int on)
 {
 	struct tsdev_list *list = file->private_data;
@@ -394,10 +404,3 @@
 
 module_init(tsdev_init);
 module_exit(tsdev_exit);
-
-MODULE_AUTHOR("James Simmons <[email protected]>");
-MODULE_DESCRIPTION("Input driver to touchscreen converter");
-MODULE_PARM(xres, "i");
-MODULE_PARM_DESC(xres, "Horizontal screen resolution");
-MODULE_PARM(yres, "i");
-MODULE_PARM_DESC(yres, "Vertical screen resolution");
#31 lore raw

Re: [PATCH 3/3] Convert tsdev to use module_param

In reply to Dmitry Torokhov

===================================================================

[email protected], 2004-01-05 00:36:03-05:00, [email protected]
Input: convert tsdev to the new way of handling parameters
and document them in kernel-parameters.txt

 Documentation/kernel-parameters.txt |    6 +++++-
 drivers/input/tsdev.c               |   23 +++++++++++++----------
 2 files changed, 18 insertions(+), 11 deletions(-)

===================================================================

Documentation/kernel-parameters.txt +5 -1
diff -Nru a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
@@ -37,7 +37,7 @@
 	MCA	MCA bus support is enabled.
 	MDA	MDA console support is enabled.
 	MOUSE	Appropriate mouse support is enabled.
-	MTD	MTD support is nebaled.
+	MTD	MTD support is enabled.
 	NET	Appropriate network support is enabled.
 	NFS	Appropriate NFS support is enabled.
 	OSS	OSS sound support is enabled.
@@ -57,6 +57,7 @@
 	SMP	The kernel is an SMP kernel.
 	SPARC	Sparc architecture is enabled.
 	SWSUSP	Software suspension is enabled.
+	TS	Appropriate touchscreen support is enabled.
 	USB	USB support is enabled.
 	V4L	Video For Linux support is enabled.
 	VGA	The VGA console has been enabled.
@@ -1135,6 +1136,9 @@
 	trix=		[HW,OSS] MediaTrix AudioTrix Pro
 			Format: <io>,<irq>,<dma>,<dma2>,<sb_io>,<sb_irq>,<sb_dma>,<mpu_io>,<mpu_irq>
  
+	tsdev.xres	[TS] Horizontal screen resolution.
+	tsdev.yres	[TS] Vertical screen resolution.
+
 	u14-34f=	[HW,SCSI] UltraStor 14F/34F SCSI host adapter
 			See header of drivers/scsi/u14-34f.c.
 
drivers/input/tsdev.c +13 -10
diff -Nru a/drivers/input/tsdev.c b/drivers/input/tsdev.c
@@ -34,6 +34,7 @@
 #include <linux/slab.h>
 #include <linux/poll.h>
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/init.h>
 #include <linux/input.h>
 #include <linux/major.h>
@@ -51,6 +52,18 @@
 #define CONFIG_INPUT_TSDEV_SCREEN_Y	320
 #endif
 
+MODULE_AUTHOR("James Simmons <[email protected]>");
+MODULE_DESCRIPTION("Input driver to touchscreen converter");
+MODULE_LICENSE("GPL");
+
+static int xres = CONFIG_INPUT_TSDEV_SCREEN_X;
+module_param(xres, uint, 0);
+MODULE_PARM_DESC(xres, "Horizontal screen resolution");
+
+static int yres = CONFIG_INPUT_TSDEV_SCREEN_Y;
+module_param(yres, uint, 0);
+MODULE_PARM_DESC(yres, "Vertical screen resolution");
+
 struct tsdev {
 	int exist;
 	int open;
@@ -82,9 +95,6 @@
 
 static struct tsdev *tsdev_table[TSDEV_MINORS];
 
-static int xres = CONFIG_INPUT_TSDEV_SCREEN_X;
-static int yres = CONFIG_INPUT_TSDEV_SCREEN_Y;
-
 static int tsdev_fasync(int fd, struct file *file, int on)
 {
 	struct tsdev_list *list = file->private_data;
@@ -394,10 +404,3 @@
 
 module_init(tsdev_init);
 module_exit(tsdev_exit);
-
-MODULE_AUTHOR("James Simmons <[email protected]>");
-MODULE_DESCRIPTION("Input driver to touchscreen converter");
-MODULE_PARM(xres, "i");
-MODULE_PARM_DESC(xres, "Horizontal screen resolution");
-MODULE_PARM(yres, "i");
-MODULE_PARM_DESC(yres, "Vertical screen resolution");
#32 lore raw

Re: [PATCH 2/3] Convert mouse drivers to use module_param

In reply to Dmitry Torokhov

===================================================================

[email protected], 2004-01-05 00:25:23-05:00, [email protected]
Input: convert the rest of mouse devices to the new way of
handling kernel parameters and document them in kernel-parameters.txt

 Documentation/kernel-parameters.txt |   12 ++++++++++--
 drivers/input/mouse/98busmouse.c    |   17 ++++-------------
 drivers/input/mouse/inport.c        |   19 +++++--------------
 drivers/input/mouse/logibm.c        |   17 ++++-------------
 drivers/input/mousedev.c            |   17 +++++++++--------
 5 files changed, 32 insertions(+), 50 deletions(-)

===================================================================

Documentation/kernel-parameters.txt +10 -2
diff -Nru a/Documentation/kernel-parameters.txt b/Documentation/kernel-parameters.txt
@@ -85,6 +85,9 @@
 			See header of drivers/scsi/53c7xx.c.
 			See also Documentation/scsi/ncr53c7xx.txt.
 
+	98busmouse.irq=	[HW,MOUSE] PC-9801 Bus Mouse Driver
+			Format: <irq>, default is 13
+
 	acpi=		[HW,ACPI] Advanced Configuration and Power Interface 
 			Format: { force | off | ht }
 			force -- enables ACPI for systems with default off
@@ -417,7 +420,7 @@
 
 	initrd=		[BOOT] Specify the location of the initial ramdisk
 
-	inport_irq=	[HW] Inport (ATI XL and Microsoft) busmouse driver
+	inport.irq=	[HW] Inport (ATI XL and Microsoft) busmouse driver
 			Format: <irq>
 
 	inttest=	[IA64]
@@ -465,7 +468,7 @@
 
 	lockd.tcpport=	[NFS]
 
-	logibm_irq=	[HW,MOUSE] Logitech Bus Mouse Driver
+	logibm.irq=	[HW,MOUSE] Logitech Bus Mouse Driver
 			Format: <irq>
 
 	log_buf_len=n	Sets the size of the printk ring buffer, in bytes.
@@ -564,6 +567,11 @@
 			See Documentation/video4linux/meye.txt.
 
 	mga=		[HW,DRM]
+
+	mousedev.xres	[MOUSE] Horizontal screen resolution, used for devices
+			reporting absolute coordinates, such as tablets
+	mousedev.yres	[MOUSE] Vertical screen resolution, used for devices
+			reporting absolute coordinates, such as tablets
 
 	mpu401=		[HW,OSS]
 			Format: <io>,<irq>
drivers/input/mouse/98busmouse.c +4 -13
diff -Nru a/drivers/input/mouse/98busmouse.c b/drivers/input/mouse/98busmouse.c
@@ -33,6 +33,7 @@
 
 #include <linux/config.h>
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/delay.h>
 #include <linux/ioport.h>
 #include <linux/init.h>
@@ -69,9 +70,10 @@
 
 #define PC98BM_IRQ		13
 
-MODULE_PARM(pc98bm_irq, "i");
-
 static int pc98bm_irq = PC98BM_IRQ;
+module_param_named(irq, pc98bm_irq, uint, 0);
+MODULE_PARM_DESC(irq, "IRQ number (13=default)");
+
 static int pc98bm_used = 0;
 
 static irqreturn_t pc98bm_interrupt(int irq, void *dev_id, struct pt_regs *regs);
@@ -140,17 +142,6 @@
 
 	return IRQ_HANDLED;
 }
-
-#ifndef MODULE
-static int __init pc98bm_setup(char *str)
-{
-        int ints[4];
-        str = get_options(str, ARRAY_SIZE(ints), ints);
-        if (ints[0] > 0) pc98bm_irq = ints[1];
-        return 1;
-}
-__setup("pc98bm_irq=", pc98bm_setup);
-#endif
 
 static int __init pc98bm_init(void)
 {
drivers/input/mouse/inport.c +5 -14
diff -Nru a/drivers/input/mouse/inport.c b/drivers/input/mouse/inport.c
@@ -35,6 +35,7 @@
  */
 
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/config.h>
 #include <linux/ioport.h>
 #include <linux/init.h>
@@ -80,10 +81,11 @@
 
 #define INPORT_IRQ		5
 
-MODULE_PARM(inport_irq, "i");
-
 static int inport_irq = INPORT_IRQ;
-static int inport_used = 0;
+module_param_named(irq, inport_irq, uint, 0);
+MODULE_PARM_DESC(irq, "IRQ number (5=default)");
+
+static int inport_used;
 
 static irqreturn_t inport_interrupt(int irq, void *dev_id, struct pt_regs *regs);
 
@@ -152,17 +154,6 @@
 	input_sync(&inport_dev);
 	return IRQ_HANDLED;
 }
-
-#ifndef MODULE
-static int __init inport_setup(char *str)
-{
-        int ints[4];
-        str = get_options(str, ARRAY_SIZE(ints), ints);
-        if (ints[0] > 0) inport_irq = ints[1];
-        return 1;
-}
-__setup("inport_irq=", inport_setup);
-#endif
 
 static int __init inport_init(void)
 {
drivers/input/mouse/logibm.c +4 -13
diff -Nru a/drivers/input/mouse/logibm.c b/drivers/input/mouse/logibm.c
@@ -36,6 +36,7 @@
  */
 
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/delay.h>
 #include <linux/ioport.h>
 #include <linux/init.h>
@@ -70,9 +71,10 @@
 
 #define LOGIBM_IRQ		5
 
-MODULE_PARM(logibm_irq, "i");
-
 static int logibm_irq = LOGIBM_IRQ;
+module_param_named(irq, logibm_irq, uint, 0);
+MODULE_PARM_DESC(irq, "IRQ number (5=default)");
+
 static int logibm_used = 0;
 
 static irqreturn_t logibm_interrupt(int irq, void *dev_id, struct pt_regs *regs);
@@ -141,17 +143,6 @@
 	outb(LOGIBM_ENABLE_IRQ, LOGIBM_CONTROL_PORT);
 	return IRQ_HANDLED;
 }
-
-#ifndef MODULE
-static int __init logibm_setup(char *str)
-{
-        int ints[4];
-        str = get_options(str, ARRAY_SIZE(ints), ints);
-        if (ints[0] > 0) logibm_irq = ints[1];
-        return 1;
-}
-__setup("logibm_irq=", logibm_setup);
-#endif
 
 static int __init logibm_init(void)
 {
drivers/input/mousedev.c +9 -8
diff -Nru a/drivers/input/mousedev.c b/drivers/input/mousedev.c
@@ -15,6 +15,7 @@
 #include <linux/slab.h>
 #include <linux/poll.h>
 #include <linux/module.h>
+#include <linux/moduleparam.h>
 #include <linux/init.h>
 #include <linux/input.h>
 #include <linux/config.h>
@@ -38,6 +39,14 @@
 #define CONFIG_INPUT_MOUSEDEV_SCREEN_Y	768
 #endif
 
+static int xres = CONFIG_INPUT_MOUSEDEV_SCREEN_X;
+module_param(xres, uint, 0);
+MODULE_PARM_DESC(xres, "Horizontal screen resolution");
+
+static int yres = CONFIG_INPUT_MOUSEDEV_SCREEN_Y;
+module_param(yres, uint, 0);
+MODULE_PARM_DESC(yres, "Vertical screen resolution");
+
 struct mousedev {
 	int exist;
 	int open;
@@ -73,9 +82,6 @@
 static struct mousedev *mousedev_table[MOUSEDEV_MINORS];
 static struct mousedev mousedev_mix;
 
-static int xres = CONFIG_INPUT_MOUSEDEV_SCREEN_X;
-static int yres = CONFIG_INPUT_MOUSEDEV_SCREEN_Y;
-
 #define fx(i)  (list->old_x[(list->pkt_count - (i)) & 03])
 #define fy(i)  (list->old_y[(list->pkt_count - (i)) & 03])
 
@@ -582,8 +588,3 @@
 
 module_init(mousedev_init);
 module_exit(mousedev_exit);
-
-MODULE_PARM(xres, "i");
-MODULE_PARM_DESC(xres, "Horizontal screen resolution");
-MODULE_PARM(yres, "i");
-MODULE_PARM_DESC(yres, "Vertical screen resolution");
#33 lore raw
In reply to Dmitry Torokhov
Quoted 9 lines · Dmitry Torokhov

I made 3 more input patches:

- compile fix in 98busmose driver (it still had its interrupt routine returning voooid instead of irqreturn_t)
- the rest of mouse devices converted to the new way of handling kernel parameters and document them in kernel-parametes.txt
- convert tsdev module to the new way of handling kernel parameters and document them in kernle-parameters.txt.

Quoted 8 lines

The patches can be found at the following addresses:
http://www.geocities.com/dt_or/input/2_6_1-rc1/
http://www.geocities.com/dt_or/input/2_6_1-rc1-mm1/

Vojtech, Andrew,

are you interested in these kind of patches and should I take a stab at converting joysticks diectory as well?

Yup, I am. :) Not sure if it's 2.6.[12] stuff, but it needs to be done sooner or later.

Signature · 2 lines
Vojtech Pavlik
SuSE Labs, SuSE CR
#34 lore raw

PATCH 1/3 Fix compile error in 98busmouse.c module

In reply to Dmitry Torokhov

===================================================================

[email protected], 2004-01-04 23:57:27-05:00, [email protected]
Input: Fix 98busmouse compile error -
have interrupt routine return IRQ_HANDLED

 98busmouse.c |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

===================================================================

drivers/input/mouse/98busmouse.c +4 -2
diff -Nru a/drivers/input/mouse/98busmouse.c b/drivers/input/mouse/98busmouse.c
@@ -74,7 +74,7 @@
 static int pc98bm_irq = PC98BM_IRQ;
 static int pc98bm_used = 0;
 
-static void pc98bm_interrupt(int irq, void *dev_id, struct pt_regs *regs);
+static irqreturn_t pc98bm_interrupt(int irq, void *dev_id, struct pt_regs *regs);
 
 static int pc98bm_open(struct input_dev *dev)
 {
@@ -113,7 +113,7 @@
 	},
 };
 
-static void pc98bm_interrupt(int irq, void *dev_id, struct pt_regs *regs)
+static irqreturn_t pc98bm_interrupt(int irq, void *dev_id, struct pt_regs *regs)
 {
 	char dx, dy;
 	unsigned char buttons;
@@ -137,6 +137,8 @@
 	input_sync(&pc98bm_dev);
 
 	outb(PC98BM_ENABLE_IRQ, PC98BM_CONTROL_PORT);
+
+	return IRQ_HANDLED;
 }
 
 #ifndef MODULE
#35 lore raw
In reply to Dmitry Torokhov
Quoted 9 lines · Dmitry Torokhov

I made 3 more input patches:

- compile fix in 98busmose driver (it still had its interrupt routine returning voooid instead of irqreturn_t)
- the rest of mouse devices converted to the new way of handling kernel parameters and document them in kernel-parametes.txt
- convert tsdev module to the new way of handling kernel parameters and document them in kernle-parameters.txt.

Quoted 8 lines

The patches can be found at the following addresses:
http://www.geocities.com/dt_or/input/2_6_1-rc1/
http://www.geocities.com/dt_or/input/2_6_1-rc1-mm1/

Vojtech, Andrew,

are you interested in these kind of patches and should I take a stab at converting joysticks diectory as well?

Yup, I am. :) Not sure if it's 2.6.[12] stuff, but it needs to be done sooner or later.

Signature · 2 lines
Vojtech Pavlik
SuSE Labs, SuSE CR
#36 lore raw
In reply to Dmitry Torokhov
Quoted 8 lines · Dmitry Torokhov

Hi Vojtech,

I have a new set of input patches, could you take look at them?

1. i8042-suspend.patch
Add suspend methods to i8042 to restore BIOS settings on suspend and kill polling timer which sometimes prevents APM suspend

See comments.

Quoted 2 lines

2. i8042-options-parsing.patch
psmouse-options-parsing.patch

See comments.

Quoted 9 lines

atkbd-options.parsing
Complete conversion to the new way of parsing parameters. Drop "i8042_", "psmouse_" and "atkbd_" prefixes from option names when compiled as a module and require "i8042.", "psmouse." and "atkbd." prefixes if built into the kernel.

3. missing-module-license.patch
Maple and newton keyboard drivers were missing MODULE_LICENSE("GPL")

Quoted 7 lines

4. kconfig-synaptics-help.patch
Suggest psmouse.proto=imps to Synaptics users who do not want install native XFree Synaptics driver so taps would still work

5. sis-aux-port.patch
Do not ignore AUX port if chipset fails to disable it when we do probes as SiS is having trouble disabling but otherwise mouse works fine.

All patches except the first one are OK, in psmouse-options, there is a little typo.

Signature · 2 lines
Vojtech Pavlik
SuSE Labs, SuSE CR
#37 lore raw

PATCH 1/7 i8042 suspend

In reply to Dmitry Torokhov

===================================================================

[email protected], 2004-01-02 00:22:32-05:00, [email protected]
Input: Add suspend methods to restore original controller state
on suspend as some BIOS don't like the state we leave it in. Also synchroniously delete the polling timer on module exit.

 i8042.c |   76 +++++++++++++++++++++++++++++++++++++++++++++-------------------
 1 files changed, 54 insertions(+), 22 deletions(-)

===================================================================

drivers/input/serio/i8042.c +54 -22
diff -Nru a/drivers/input/serio/i8042.c b/drivers/input/serio/i8042.c
@@ -746,6 +746,29 @@
 
 
 /*
+ * Reset the controller.
+ */
+void i8042_controller_reset(void)
+{
+	if (i8042_reset) {
+		unsigned char param;
+
+		if (i8042_command(&param, I8042_CMD_CTL_TEST))
+			printk(KERN_ERR "i8042.c: i8042 controller reset timeout.\n");
+	}
+
+/*
+ * Restore the original control register setting.
+ */
+
+	i8042_ctr = i8042_initial_ctr;
+
+	if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR))
+		printk(KERN_WARNING "i8042.c: Can't restore CTR.\n");
+}
+
+
+/*
  * Here we try to reset everything back to a state in which the BIOS will be
  * able to talk to the hardware when rebooting.
  */
@@ -770,26 +793,20 @@
 		if (i8042_mux_values[i].exists)
 			serio_cleanup(i8042_mux_port + i);
 
-/*
- * Reset the controller.
- */
-
-	if (i8042_reset) {
-		unsigned char param;
+	i8042_controller_reset();
+}
 
-		if (i8042_command(&param, I8042_CMD_CTL_TEST))
-			printk(KERN_ERR "i8042.c: i8042 controller reset timeout.\n");
-	}
 
 /*
- * Restore the original control register setting.
+ * Here we try to restore the original BIOS settings
  */
 
-	i8042_ctr = i8042_initial_ctr;
-
-	if (i8042_command(&i8042_ctr, I8042_CMD_CTL_WCTR))
-		printk(KERN_WARNING "i8042.c: Can't restore CTR.\n");
+static int i8042_controller_suspend(void)
+{
+	del_timer_sync(&i8042_timer);
+	i8042_controller_reset();
 
+	return 0;
 }
 
 
@@ -809,7 +826,7 @@
 	if (i8042_mux_present)
 		if (i8042_enable_mux_mode(&i8042_aux_values, NULL) ||
 		    i8042_enable_mux_ports(&i8042_aux_values)) {
-			printk(KERN_WARNING "i8042: failed to resume active multiplexor, mouse won't wotk.\n");
+			printk(KERN_WARNING "i8042: failed to resume active multiplexor, mouse won't work.\n");
 		}
 
 /*
@@ -825,6 +842,10 @@
 	for (i = 0; i < 4; i++)
 		if (i8042_mux_values[i].exists && i8042_activate_port(i8042_mux_port + i) == 0)
 			serio_reconnect(i8042_mux_port + i);
+/*
+ * Restart timer (for polling "stuck" data)
+ */ 
+	mod_timer(&i8042_timer, jiffies + I8042_POLL_PERIOD);
 
 	return 0;
 }
@@ -851,16 +872,22 @@
 };
 
 /*
- * Resume handler for the new PM scheme (driver model)
+ * Suspend/resume handlers for the new PM scheme (driver model)
  */
+static int i8042_suspend(struct sys_device *dev, u32 state)
+{
+	return i8042_controller_suspend();
+}
+
 static int i8042_resume(struct sys_device *dev)
 {
 	return i8042_controller_resume();
 }
 
 static struct sysdev_class kbc_sysclass = {
-       set_kset_name("i8042"),
-       .resume = i8042_resume,
+	set_kset_name("i8042"),
+	.suspend = i8042_suspend,
+	.resume = i8042_resume,
 };
 
 static struct sys_device device_i8042 = {
@@ -869,12 +896,17 @@
 };
 
 /*
- * Resume handler for the old PM scheme (APM)
+ * Suspend/resume handler for the old PM scheme (APM)
  */
 static int i8042_pm_callback(struct pm_dev *dev, pm_request_t request, void *dummy)
 {
-	if (request == PM_RESUME)
-		return i8042_controller_resume();
+	switch (request) {
+		case PM_SUSPEND:
+			return i8042_controller_suspend();
+
+		case PM_RESUME:
+			return i8042_controller_resume();
+	}
 
 	return 0;
 }
@@ -955,7 +987,7 @@
 		sysdev_class_unregister(&kbc_sysclass);
 	}
 
-	del_timer(&i8042_timer);
+	del_timer_sync(&i8042_timer);
 
 	i8042_controller_cleanup();
 	
#38 lore raw
In reply to Dmitry Torokhov

I made 3 more input patches:

- compile fix in 98busmose driver (it still had its interrupt routine returning voooid instead of irqreturn_t)
- the rest of mouse devices converted to the new way of handling kernel parameters and document them in kernel-parametes.txt
- convert tsdev module to the new way of handling kernel parameters and document them in kernle-parameters.txt.

The patches can be found at the following addresses:
http://www.geocities.com/dt_or/input/2_6_1-rc1/
http://www.geocities.com/dt_or/input/2_6_1-rc1-mm1/

Vojtech, Andrew,

are you interested in these kind of patches and should I take a stab at converting joysticks diectory as well?

Dmitry