toshiba_acpi.c: Add key_entry for a lone FN keypress
Subsystems (2)
PATCH 1/1 toshiba_acpi.c: Add key_entry for a lone FN keypress
A lone FN key press on a Toshiba Portégé R700 without another key in conjunction results in an ACPI event and a spurious error message on the console.
Add a key entry to map this event to a KEY_UNKNOWN keypress silences this message.
----
drivers/platform/x86/toshiba_acpi.c +1 -0
@@ -142,6 +142,7 @@ static struct key_entry toshiba_acpi_keymap[] = { {KE_KEY, 0x141, KEY_BRIGHTNESSUP}, {KE_KEY, 0x142, KEY_WLAN}, {KE_KEY, 0x143, KEY_PROG1}, + {KE_KEY, 0x17f, KEY_UNKNOWN}, /* FN key by itself */ {KE_KEY, 0xb05, KEY_PROG2}, {KE_KEY, 0xb06, KEY_WWW}, {KE_KEY, 0xb07, KEY_MAIL},
Quoted 7 lines · Jon Dowland
A lone FN key press on a Toshiba Portégé R700 without another key in conjunction results in an ACPI event and a spurious error message on the console.
Add a key entry to map this event to a
KEY_UNKNOWNkeypress silences this message.
Well, if FN key can generate separate events then we should report KEY_FN, not KEY_UNKNOWN.
Thanks.
Signature · 1 line
Dmitry
Azael Avalos
maintainerHi,
It actually generates on key press/release with different key codes, 0x17f and 0x100 respectively. So I think that both should be added.
Quoted 21 lines · Dmitry Torokhov
Quoted 7 lines · Jon Dowland
A lone FN key press on a Toshiba Portégé R700 without another key in conjunction results in an ACPI event and a spurious error message on the console.
Add a key entry to map this event to a
KEY_UNKNOWNkeypress silences this message.Well, if FN key can generate separate events then we should report
KEY_FN, notKEY_UNKNOWN.Thanks.
--
Dmitry
--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Signature · 1 line
-- El mundo apesta y vosotros apestais tambien --
Quoted 2 lines · Dmitry Torokhov
Well, if FN key can generate separate events then we should report
KEY_FN, notKEY_UNKNOWN.
Good point, thanks. I missed that when I went shopping for an appropriate KEY_*.
Adjusted patch to apply on top of current HEAD.
A lone FN key press on a Toshiba Portégé R700 without another key in conjunction results in an ACPI event and a spurious error message on the console.
Add a key entry to map this event to a KEY_UNKNOWN keypress silences this message.
----
drivers/platform/x86/toshiba_acpi.c +1 -0
@@ -135,6 +135,7 @@ { KE_KEY, 0x141, { KEY_BRIGHTNESSUP } }, { KE_KEY, 0x142, { KEY_WLAN } }, { KE_KEY, 0x143, { KEY_PROG1 } }, + { KE_KEY, 0x17f, { KEY_FN } }, { KE_KEY, 0xb05, { KEY_PROG2 } }, { KE_KEY, 0xb06, { KEY_WWW } }, { KE_KEY, 0xb07, { KEY_MAIL } },
Quoted 2 lines · Azael Avalos
It actually generates on key press/release with different key codes,
0x17fand0x100respectively. So I think that both should be added.
Presently the driver ignores key release events and only deals with key presses. It also filters out a 0x100 value specifically in the event handler. Do you mean something like this (untested)?
toshiba_acpi.c renamed from toshiba_acpi.c~ +2 -2
@@ -123,6 +123,7 @@MODULE_DEVICE_TABLE (acpi, toshiba_device_ids);static const struct key_entry toshiba_acpi_keymap[]__initconst = { + {KE_KEY ,0x100 , {KEY_FN } },/* up */ {KE_KEY ,0x101 , {KEY_MUTE } }, {KE_KEY ,0x102 , {KEY_ZOOMOUT } }, {KE_KEY ,0x103 , {KEY_ZOOMIN } },
@@ -135,6 +136,7 @@ { KE_KEY, 0x141, { KEY_BRIGHTNESSUP } }, { KE_KEY, 0x142, { KEY_WLAN } }, { KE_KEY, 0x143, { KEY_PROG1 } }, + { KE_KEY, 0x17f, { KEY_FN } }, /* down */ { KE_KEY, 0xb05, { KEY_PROG2 } }, { KE_KEY, 0xb06, { KEY_WWW } }, { KE_KEY, 0xb07, { KEY_MAIL } },
@@ -854,8 +856,6 @@ do { hci_read1(HCI_SYSTEM_EVENT, &value, &hci_result); if (hci_result == HCI_SUCCESS) { - if (value == 0x100) - continue; /* act on key press; ignore key release */ if (value & 0x80) continue;
Dmitry Torokhov
Acked-byQuoted 7 lines · Jon Dowland
Quoted 2 lines · Dmitry Torokhov
Well, if FN key can generate separate events then we should report
KEY_FN, notKEY_UNKNOWN.Good point, thanks. I missed that when I went shopping for an appropriate KEY_*.
Quoted 7 lines
Adjusted patch to apply on top of current HEAD.
A lone FN key press on a Toshiba Portégé R700 without another key in conjunction results in an ACPI event and a spurious error message on the console.
Add a key entry to map this event to a
KEY_UNKNOWNkeypress silences
^^^^^^
Better fix commit log message as well. Otherwise:
(or whatever tag Matthew might want to change it).
Quoted 15 lines
this message.
Signed-off-by Jon Dowland <[email protected]>----
drivers/platform/x86/toshiba_acpi.c +1
-0@@ -135,6 +135,7 @@ { KE_KEY, 0x141, { KEY_BRIGHTNESSUP } }, { KE_KEY, 0x142, { KEY_WLAN } }, { KE_KEY, 0x143, { KEY_PROG1 } }, + { KE_KEY, 0x17f, { KEY_FN } }, { KE_KEY, 0xb05, { KEY_PROG2 } }, { KE_KEY, 0xb06, { KEY_WWW } }, { KE_KEY, 0xb07, { KEY_MAIL } },
Signature · 1 line
Dmitry
Quoted 6 lines · Dmitry Torokhov
Quoted 1 line
Add a key entry to map this event to a
KEY_UNKNOWNkeypress silences^^^^^^Better fix commit log message as well. Otherwise:
Acked-by Dmitry Torokhov <[email protected]>
Thanks.
----
A lone FN key press on a Toshiba Portégé R700 without another key in conjunction results in an ACPI event and a spurious error message on the console.
Add a key entry to map this event to a KEY_FN keypress. This prevents the console message.
drivers/platform/x86/toshiba_acpi.c +1 -0
@@ -135,6 +135,7 @@ static const struct key_entry toshiba_acpi_keymap[] __initconst = { { KE_KEY, 0x141, { KEY_BRIGHTNESSUP } }, { KE_KEY, 0x142, { KEY_WLAN } }, { KE_KEY, 0x143, { KEY_PROG1 } }, + { KE_KEY, 0x17f, { KEY_FN } }, { KE_KEY, 0xb05, { KEY_PROG2 } }, { KE_KEY, 0xb06, { KEY_WWW } }, { KE_KEY, 0xb07, { KEY_MAIL } },
Matthew Garrett
AppliedApplied, thanks (although there was some trailing whitespace that I've cleaned up)
Signature · 1 line
Matthew Garrett | [email protected]