linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Bruno Prémont" <bonbons@linux-vserver.org>
To: Dmitry Torokhov <dtor@mail.ru>
Cc: Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	Linux Input <linux-input@vger.kernel.org>
Subject: [PATCH] Input: i8042 - move Dritek quirk so it also gets applied on resume
Date: Fri, 16 May 2008 22:08:26 +0200	[thread overview]
Message-ID: <200805162208.27593.bonbons@linux-vserver.org> (raw)

This patch moves the quirk from from i8042_probe() to i8042_enable_kbd_port()
which is also called during resume.

I think it is safe to ignore failure to enable dritek. I would also prefer not 
to fail complete keyboard initialisation if the extension fails.

---
The Dritek quirk is also required on resume from S2RAM, doing it only at probe
time is not sufficient.


Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
CC: Dmitry Torokhov <dtor@mail.ru>

diff -NurpP linux-2.6.25.4-orig/drivers/input/serio/i8042.c 
linux-2.6.25.4/drivers/input/serio/i8042.c
--- linux-2.6.25.4-orig/drivers/input/serio/i8042.c	2008-04-17 
04:49:44.000000000 +0200
+++ linux-2.6.25.4/drivers/input/serio/i8042.c	2008-05-16 21:37:12.000000000 
+0200
@@ -404,6 +404,15 @@ static int i8042_enable_kbd_port(void)
 		printk(KERN_ERR "i8042.c: Failed to enable KBD port.\n");
 		return -EIO;
 	}
+#ifdef CONFIG_X86
+	if (i8042_dritek) {
+		char param = 0x90;
+		int error = i8042_command(&param, 0x1059);
+		if (error)
+			printk(KERN_WARNING "Failed to enable DRITEK "
+			       "extension: %d\n", error);
+	}
+#endif
 
 	return 0;
 }
@@ -1171,14 +1179,6 @@ static int __devinit i8042_probe(struct 
 		if (error)
 			goto out_fail;
 	}
-#ifdef CONFIG_X86
-	if (i8042_dritek) {
-		char param = 0x90;
-		error = i8042_command(&param, 0x1059);
-		if (error)
-			goto out_fail;
-	}
-#endif
 /*
  * Ok, everything is ready, let's register all serio ports
  */

--
To unsubscribe from this list: send the line "unsubscribe linux-input" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

                 reply	other threads:[~2008-05-16 20:18 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200805162208.27593.bonbons@linux-vserver.org \
    --to=bonbons@linux-vserver.org \
    --cc=dtor@mail.ru \
    --cc=linux-input@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.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;
as well as URLs for NNTP newsgroup(s).