Re: Fn key and 2.6.12-rc4

From: Stelian Pop
Date: Tue Aug 02 2005 - 04:13:56 EST


Le mardi 02 aoÃt 2005 Ã 09:17 +0200, Elimar Riesebieter a Ãcrit :

> > [ fnkey not working on Apple Powerbooks in -mm tree ]

> > Hmm, there seem to be a lot of divergence between -mm and linus tree
> > here, and this may be the cause of the malfunction.
> >
> > Let me do some tests tomorrow with an -mm kernel and see if I find
> > something.

Ok, the -mm tree contains some other input patches which conflict with
my Fn key patch
(input-quirk-for-the-fn-key-on-powerbooks-with-an-usb.patch). The
attached patch makes it work again.

Andrew, please apply.

Stelian.

Newer input patches added a HID_UP_LOGIVENDOR switch case which disrupts
the Apple Powerbooks Fn key patch. Moving a few lines of code from the
'default' switch case to the new location makes it work again.

Signed-off-by: Stelian Pop <stelian@xxxxxxxxxx>

Index: linux-2.6.12-rc4-mm1/drivers/usb/input/hid-input.c
===================================================================
--- linux-2.6.12-rc4-mm1.orig/drivers/usb/input/hid-input.c 2005-08-02 09:44:28.000000000 +0200
+++ linux-2.6.12-rc4-mm1/drivers/usb/input/hid-input.c 2005-08-02 10:57:13.000000000 +0200
@@ -323,6 +323,11 @@

case HID_UP_MSVENDOR:
case HID_UP_LOGIVENDOR:
+
+ if ((device->quirks & HID_QUIRK_POWERBOOK_FN_BUTTON) && (usage->hid == 0x00ff0003)) {
+ map_key_clear(KEY_RIGHTCTRL);
+ break;
+ }
goto ignore;

case HID_UP_LOGIVENDOR2: /* Reported on Logitech Ultra X Media Remote */
@@ -376,10 +381,7 @@

default:
unknown:
- if ((device->quirks & HID_QUIRK_POWERBOOK_FN_BUTTON) && (usage->hid == 0x00ff0003)) {
- map_key_clear(KEY_RIGHTCTRL);
- break;
- }
+
if (field->report_size == 1) {
if (field->report->type == HID_OUTPUT_REPORT) {
map_led(LED_MISC);


--
Stelian Pop <stelian@xxxxxxxxxx>

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/