2007-09-14 11:39:46

by Bernhard Rosenkraenzer

[permalink] [raw]
Subject: [PATCH] Make wistron-btns recognize special keys on Medion WIM2160 notebooks

The patch below adds support for Medion WIM2160 notebooks to the wistron-btns
driver.

Signed-off-by: Bernhard Rosenkraenzer <[email protected]>

--- linux-2.6.22/drivers/input/misc/wistron_btns.c.ark 2007-09-07
22:47:49.000000000 +0000
+++ linux-2.6.22/drivers/input/misc/wistron_btns.c 2007-09-07
22:54:19.000000000 +0000
@@ -536,6 +536,13 @@
{ KE_END, FE_MAIL_LED | FE_WIFI_LED | FE_UNTESTED }
};

+static struct key_entry keymap_medion_wim2160[] __initdata = {
+ { KE_WIFI, 0x30 },
+ { KE_KEY, 0x11, {KEY_PROG1} },
+ { KE_KEY, 0x12, {KEY_PROG2} },
+ { KE_END, 0 }
+};
+
static struct key_entry keymap_wistron_md2900[] __initdata = {
{ KE_KEY, 0x01, {KEY_HELP} },
{ KE_KEY, 0x02, {KEY_CONFIG} },
@@ -917,6 +924,15 @@
},
.driver_data = keymap_fs_amilo_d88x0
},
+ {
+ .callback = dmi_matched,
+ .ident = "Medion WIM2160",
+ .matches = {
+ DMI_MATCH(DMI_SYS_VENDOR, "MEDION"),
+ DMI_MATCH(DMI_PRODUCT_NAME, "WIM2160"),
+ },
+ .driver_data = keymap_medion_wim2160
+ },
{ NULL, }
};


2007-09-14 12:00:23

by Carlos Corbacho

[permalink] [raw]
Subject: Re: [PATCH] Make wistron-btns recognize special keys on Medion WIM2160 notebooks

Bernhard Rosenkraenzer wrote:

> The patch below adds support for Medion WIM2160 notebooks to the
> wistron-btns driver.

Do these keys emit proper scancodes though? If yes (i.e. you press a button
and get a warning about "unknown scancodes" in dmesg), then they should not
be added to wistron-btns, but to hal-info in userspace.

-Carlos
--
E-Mail: [email protected]
Web: strangeworlds.co.uk
GPG Key ID: 0x23EE722D

2007-09-19 23:02:46

by Andrew Morton

[permalink] [raw]
Subject: Re: [PATCH] Make wistron-btns recognize special keys on Medion WIM2160 notebooks


Please always do reply-to-all. Otherwise people won't read your email.

On Fri, 14 Sep 2007 12:56:58 +0100
Carlos Corbacho <[email protected]> wrote:

> Bernhard Rosenkraenzer wrote:
>
> > The patch below adds support for Medion WIM2160 notebooks to the
> > wistron-btns driver.
>
> Do these keys emit proper scancodes though? If yes (i.e. you press a button
> and get a warning about "unknown scancodes" in dmesg), then they should not
> be added to wistron-btns, but to hal-info in userspace.
>

Bernhard didn't read your email.