public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel-+ZI9xUNit7I@public.gmane.org>
To: Brian Perkins <bperkins-ooduxAEi7gVg9hUCZPvPmw@public.gmane.org>
Cc: acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Subject: Re: trackpoint dead after S3 suspend
Date: Sun, 16 Nov 2003 23:53:32 +0100	[thread overview]
Message-ID: <20031116225331.GA206@elf.ucw.cz> (raw)
In-Reply-To: <3FB3B9D0.5020408-ooduxAEi7gVg9hUCZPvPmw@public.gmane.org>

Hi!

> Suspend is becoming downright usable on my Thinkpad R32 under 
> 2.6.0-test9, but I still have a showstopper:
> 
> http://bugme.osdl.org/show_bug.cgi?id=1279
> 
> describes the mouse being dead after resume.  Reloading the psmouse 
> modules doesn't work for me either, but I don't get the same error 
> message for some reason.
> 
> Looks to me that this bug was improperly filed under "other" instead of 
> ACPI.

Its actually input problem. This might help, (untested!).
								Pavel

--- clean/drivers/input/serio/i8042.c	2003-09-28 22:05:48.000000000 +0200
+++ linux/drivers/input/serio/i8042.c	2003-11-16 23:39:32.000000000 +0100
@@ -18,6 +18,7 @@
 #include <linux/reboot.h>
 #include <linux/init.h>
 #include <linux/serio.h>
+#include <linux/sysdev.h>
 
 #include <asm/io.h>
 
@@ -398,18 +399,15 @@
  * desired.
  */
 	
-static int __init i8042_controller_init(void)
+static int i8042_controller_init(void)
 {
-
 /*
  * Test the i8042. We need to know if it thinks it's working correctly
  * before doing anything else.
  */
 
 	i8042_flush();
-
 	if (i8042_reset) {
-
 		unsigned char param;
 
 		if (i8042_command(&param, I8042_CMD_CTL_TEST)) {
@@ -783,6 +781,38 @@
 	values->mux = index;
 }
 
+static int i8042_resume_port(struct serio *port)
+{
+	struct serio_dev *dev = port->dev;
+	if (dev) {
+#if 0
+		dev->disconnect(port);
+		dev->connect(port, dev);
+#endif
+		serio_close(port);
+		serio_open(port, dev);
+	}	
+}
+
+static int i8042_resume(struct sys_device *dev)
+{
+	if (i8042_controller_init())
+		printk(KERN_ERR "i8042: resume failed\n");
+	i8042_resume_port(&i8042_aux_port);
+	i8042_resume_port(&i8042_kbd_port);
+	return 0;
+}
+
+static struct sysdev_class kbc_sysclass = {
+	set_kset_name("i8042"),
+	.resume = i8042_resume,
+};
+
+static struct sys_device device_i8042 = {
+	.id	= 0,
+	.cls	= &kbc_sysclass,
+};
+
 int __init i8042_init(void)
 {
 	int i;
@@ -819,6 +849,14 @@
 
 	register_reboot_notifier(&i8042_notifier);
 
+	{
+		int error = sysdev_class_register(&kbc_sysclass);
+		if (!error)
+			error = sys_device_register(&device_i8042);
+		if (error)
+			printk(KERN_CRIT "Unable to register i8042 to driver model\n");
+	}
+
 	return 0;
 }
 

-- 
When do you have a heart between your knees?
[Johanka's followup: and *two* hearts?]


-------------------------------------------------------
This SF. Net email is sponsored by: GoToMyPC
GoToMyPC is the fast, easy and secure way to access your computer from
any Web browser or wireless device. Click here to Try it Free!
https://www.gotomypc.com/tr/OSDN/AW/Q4_2003/t/g22lp?Target=mm/g22lp.tmpl

  parent reply	other threads:[~2003-11-16 22:53 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-11-13 17:05 trackpoint dead after S3 suspend Brian Perkins
     [not found] ` <3FB3B9D0.5020408-ooduxAEi7gVg9hUCZPvPmw@public.gmane.org>
2003-11-13 18:12   ` Karol Kozimor
2003-11-16 22:53   ` Pavel Machek [this message]
     [not found]     ` <20031116225331.GA206-I/5MKhXcvmPrBKCeMvbIDA@public.gmane.org>
2003-11-19 14:58       ` Karol Kozimor
     [not found]         ` <20031119145809.GA14399-DETuoxkZsSqrDJvtcaxF/A@public.gmane.org>
2003-11-19 19:08           ` Pavel Machek
2003-11-23  7:13           ` Brian Perkins
     [not found]             ` <3FC05E17.1010208-ooduxAEi7gVg9hUCZPvPmw@public.gmane.org>
2003-11-23 10:32               ` Pavel Machek
     [not found]                 ` <3FC1A754.5080209@netspace.org>
     [not found]                   ` <3FC1A754.5080209-ooduxAEi7gVg9hUCZPvPmw@public.gmane.org>
2003-11-24  9:54                     ` Pavel Machek

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=20031116225331.GA206@elf.ucw.cz \
    --to=pavel-+zi9xunit7i@public.gmane.org \
    --cc=acpi-devel-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org \
    --cc=bperkins-ooduxAEi7gVg9hUCZPvPmw@public.gmane.org \
    /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