The Linux Kernel Mailing List
 help / color / mirror / Atom feed
From: TJ <linux@tjworld.net>
To: linux-kernel <linux-kernel@vger.kernel.org>
Cc: Bug 346586 <346586@bugs.launchpad.net>
Subject: wistron_btns: support Prestigio Wifi RF kill button over suspend
Date: Thu, 30 Jul 2009 08:38:50 +0100	[thread overview]
Message-ID: <1248939530.3410.10.camel@hephaestion> (raw)

We've been carrying this patch in Ubuntu since March 2009. I emailed the
upstream maintainer prior to that but there was no reply or action so it
hasn't been pushed upstream as I had expected.

https://launchpad.net/bugs/346586

I wonder if the maintainer field for this module should be changed to
reflect that?

----

The Prestigio 157, an old no-name clone laptop uses input keys very
similar to the Wistron 1557/MS2141 with the addition of BIOS-controlled
wireless radio frequency kill switch.

This patch adds support for the RF kill switch control and adds manual
identification of the model.

The Prestigio does not expose any recognisable identity via dmidecode
and so requires manual selection at module init using

force=1 keymap=prestigio

Signed-off-by: TJ <ubuntu@tjworld.net>

diff --git a/drivers/input/misc/wistron_btns.c b/drivers/input/misc/wistron_btns.c
--- a/drivers/input/misc/wistron_btns.c
+++ b/drivers/input/misc/wistron_btns.c
@@ -611,6 +611,20 @@ static struct key_entry keymap_wistron_generic[] __initdata = {
 	{ KE_END, 0 }
 };
 
+static struct key_entry keymap_prestigio[] __initdata = {
+	{ KE_KEY,  0x11, {KEY_PROG1} },
+	{ KE_KEY,  0x12, {KEY_PROG2} },
+	{ KE_WIFI,  0x30 },
+	{ KE_KEY,  0x22, {KEY_REWIND} },
+	{ KE_KEY,  0x23, {KEY_FORWARD} },
+	{ KE_KEY,  0x24, {KEY_PLAYPAUSE} },
+	{ KE_KEY,  0x25, {KEY_STOPCD} },
+	{ KE_KEY,  0x31, {KEY_MAIL} },
+	{ KE_KEY,  0x36, {KEY_WWW} },
+	{ KE_END,  0 }
+};
+
+
 /*
  * If your machine is not here (which is currently rather likely), please send
  * a list of buttons and their key codes (reported when loading this module
@@ -964,6 +978,10 @@ static int __init select_keymap(void)
 			keymap = keymap_wistron_ms2141;
 		else if (strcmp (keymap_name, "generic") == 0)
 			keymap = keymap_wistron_generic;
+		else if (strcmp (keymap_name, "prestigio") == 0) {
+			keymap = keymap_prestigio;
+			have_wifi = 1;
+		}
 		else {
 			printk(KERN_ERR "wistron_btns: Keymap unknown\n");
 			return -EINVAL;


             reply	other threads:[~2009-07-30  7:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-30  7:38 TJ [this message]
2009-07-30 17:35 ` wistron_btns: support Prestigio Wifi RF kill button over suspend Dmitry Torokhov

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=1248939530.3410.10.camel@hephaestion \
    --to=linux@tjworld.net \
    --cc=346586@bugs.launchpad.net \
    --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