From: Miloslav Trmac <mitr@volny.cz>
To: vojtech@suse.cz
Cc: linux-kernel@vger.kernel.org, dtor_core@ameritech.net
Subject: Re: [PATCH] Wistron laptop button driver
Date: Sun, 25 Sep 2005 23:35:13 +0200 [thread overview]
Message-ID: <43371811.5020202@volny.cz> (raw)
In-Reply-To: <431E4E28.5020604@volny.cz>
[-- Attachment #1: Type: text/plain, Size: 196 bytes --]
Hello,
I'm not quite sure what has happened to the original patch, I hope it is
in someone's input tree.
Nevertheless, attached is a patch to add support for Thorsten's hardware.
Thanks,
Mirek
[-- Attachment #2: wistron_btns-ms2141.patch --]
[-- Type: text/x-patch, Size: 2246 bytes --]
Add buttons for AOpen/Wistron 1557/MS2141, as reported by Thorsten
Leemhuis. The hardware has no usable DMI info, so add a module parameter.
Signed-off-by: Miloslav Trmac <mitr@volny.cz>
--- a/drivers/input/misc/wistron_btns.c Tue Sep 20 11:08:45 2005
+++ b/drivers/input/misc/wistron_btns.c Sun Sep 25 23:23:29 2005
@@ -44,6 +44,10 @@
module_param(force, bool, 0);
MODULE_PARM_DESC(force, "Load even if computer is not in database");
+static char *keymap_name; /* = NULL; */
+module_param_named(keymap, keymap_name, charp, 0);
+MODULE_PARM_DESC(keymap, "Keymap name, if it can't be autodetected");
+
/* BIOS interface implementation */
static void __iomem *bios_entry_point; /* BIOS routine entry point */
@@ -238,6 +242,19 @@
{ KE_END, 0 }
};
+static struct key_entry keymap_wistron_ms2141[] = {
+ { KE_KEY, 0x11, KEY_PROG1 },
+ { KE_KEY, 0x12, KEY_PROG2 },
+ { KE_WIFI, 0x30, 0 },
+ { 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
with force=1) and the output of dmidecode to $MODULE_AUTHOR. */
@@ -254,6 +271,27 @@
{ 0, }
};
+static int __init select_keymap(void)
+{
+ if (keymap_name != NULL) {
+ if (strcmp (keymap_name, "1557/MS2141") == 0)
+ keymap = keymap_wistron_ms2141;
+ else {
+ printk(KERN_WARNING "wistron_btns: Keymap unknown\n");
+ return -EINVAL;
+ }
+ }
+ dmi_check_system(dmi_ids);
+ if (keymap == NULL) {
+ if (force == 0) {
+ printk(KERN_WARNING "wistron_btns: System unknown\n");
+ return -ENODEV;
+ }
+ keymap = keymap_empty;
+ }
+ return 0;
+}
+
/* Input layer interface */
static struct input_dev input_dev = {
@@ -337,14 +375,9 @@
{
int err;
- dmi_check_system(dmi_ids);
- if (keymap == NULL) {
- if (force == 0) {
- printk(KERN_WARNING "wistron_btns: System unknown\n");
- return -ENODEV;
- }
- keymap = keymap_empty;
- }
+ err = select_keymap ();
+ if (err != 0)
+ return err;
err = map_bios();
if (err != 0)
return err;
prev parent reply other threads:[~2005-09-25 21:35 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-09-07 2:19 [PATCH] Wistron laptop button driver Miloslav Trmac
2005-09-08 5:23 ` Andrew Morton
2005-09-08 9:32 ` Miloslav Trmac
2005-09-08 6:43 ` Pekka Enberg
2005-09-08 9:36 ` Miloslav Trmac
2005-09-25 21:35 ` Miloslav Trmac [this message]
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=43371811.5020202@volny.cz \
--to=mitr@volny.cz \
--cc=dtor_core@ameritech.net \
--cc=linux-kernel@vger.kernel.org \
--cc=vojtech@suse.cz \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.