* [PATCH] toshiba_acpi.c: Add key_entry for a lone FN keypress
@ 2010-10-23 22:12 Jon Dowland
2010-10-25 18:27 ` Dmitry Torokhov
0 siblings, 1 reply; 8+ messages in thread
From: Jon Dowland @ 2010-10-23 22:12 UTC (permalink / raw)
To: Matthew Garrett; +Cc: platform-driver-x86, linux-kernel
[-- Attachment #1: Type: text/plain, Size: 821 bytes --]
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.
Signed-off-by: Jon Dowland <jmtd@debian.org>
----
diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index a388bd6..954443e 100644
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@ -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},
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] toshiba_acpi.c: Add key_entry for a lone FN keypress
2010-10-23 22:12 [PATCH] toshiba_acpi.c: Add key_entry for a lone FN keypress Jon Dowland
@ 2010-10-25 18:27 ` Dmitry Torokhov
2010-10-25 18:42 ` Azael Avalos
2010-10-26 12:00 ` Jon Dowland
0 siblings, 2 replies; 8+ messages in thread
From: Dmitry Torokhov @ 2010-10-25 18:27 UTC (permalink / raw)
To: Jon Dowland; +Cc: Matthew Garrett, platform-driver-x86, linux-kernel
On Saturday, October 23, 2010 03:12:53 pm Jon Dowland wrote:
> 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.
>
Well, if FN key can generate separate events then we should report
KEY_FN, not KEY_UNKNOWN.
Thanks.
--
Dmitry
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] toshiba_acpi.c: Add key_entry for a lone FN keypress
2010-10-25 18:27 ` Dmitry Torokhov
@ 2010-10-25 18:42 ` Azael Avalos
2010-10-26 12:06 ` Jon Dowland
2010-10-26 12:00 ` Jon Dowland
1 sibling, 1 reply; 8+ messages in thread
From: Azael Avalos @ 2010-10-25 18:42 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Jon Dowland, Matthew Garrett, platform-driver-x86, linux-kernel
Hi,
It actually generates on key press/release with different key codes,
0x17f and 0x100 respectively. So I think that both should be added.
On Mon, Oct 25, 2010 at 12:27 PM, Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
> On Saturday, October 23, 2010 03:12:53 pm Jon Dowland wrote:
>> 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.
>>
>
> Well, if FN key can generate separate events then we should report
> KEY_FN, not KEY_UNKNOWN.
>
> Thanks.
>
> --
> Dmitry
> --
> To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
>
--
-- El mundo apesta y vosotros apestais tambien --
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] toshiba_acpi.c: Add key_entry for a lone FN keypress
2010-10-25 18:27 ` Dmitry Torokhov
2010-10-25 18:42 ` Azael Avalos
@ 2010-10-26 12:00 ` Jon Dowland
2010-10-26 15:56 ` Dmitry Torokhov
1 sibling, 1 reply; 8+ messages in thread
From: Jon Dowland @ 2010-10-26 12:00 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: Matthew Garrett, platform-driver-x86, linux-kernel
On Mon, Oct 25, 2010 at 11:27:35AM -0700, Dmitry Torokhov wrote:
> Well, if FN key can generate separate events then we should report
> KEY_FN, not KEY_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.
Signed-off-by: Jon Dowland <jmtd@debian.org>
----
--- a/drivers/platform/x86/toshiba_acpi.c 2010-10-26 12:56:46.000000000 +0100
+++ b/drivers/platform/x86/toshiba_acpi.c 2010-10-26 12:58:21.000000000 +0100
@@ -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 } },
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] toshiba_acpi.c: Add key_entry for a lone FN keypress
2010-10-25 18:42 ` Azael Avalos
@ 2010-10-26 12:06 ` Jon Dowland
0 siblings, 0 replies; 8+ messages in thread
From: Jon Dowland @ 2010-10-26 12:06 UTC (permalink / raw)
To: Azael Avalos
Cc: Dmitry Torokhov, Matthew Garrett, platform-driver-x86, linux-kernel
On Mon, Oct 25, 2010 at 12:42:41PM -0600, Azael Avalos wrote:
> It actually generates on key press/release with different key codes,
> 0x17f and 0x100 respectively. 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~ 2010-10-26 12:56:46.000000000 +0100
+++ toshiba_acpi.c 2010-10-26 13:04:42.000000000 +0100
@@ -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;
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] toshiba_acpi.c: Add key_entry for a lone FN keypress
2010-10-26 12:00 ` Jon Dowland
@ 2010-10-26 15:56 ` Dmitry Torokhov
2010-10-26 23:24 ` Jon Dowland
0 siblings, 1 reply; 8+ messages in thread
From: Dmitry Torokhov @ 2010-10-26 15:56 UTC (permalink / raw)
To: Jon Dowland; +Cc: Matthew Garrett, platform-driver-x86, linux-kernel
On Tue, Oct 26, 2010 at 01:00:26PM +0100, Jon Dowland wrote:
> On Mon, Oct 25, 2010 at 11:27:35AM -0700, Dmitry Torokhov wrote:
> > Well, if FN key can generate separate events then we should report
> > KEY_FN, not KEY_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
^^^^^^
Better fix commit log message as well. Otherwise:
Acked-by: Dmitry Torokhov <dtor@mail.ru>
(or whatever tag Matthew might want to change it).
> this message.
>
> Signed-off-by: Jon Dowland <jmtd@debian.org>
>
> ----
> --- a/drivers/platform/x86/toshiba_acpi.c 2010-10-26 12:56:46.000000000 +0100
> +++ b/drivers/platform/x86/toshiba_acpi.c 2010-10-26 12:58:21.000000000 +0100
> @@ -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 } },
--
Dmitry
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] toshiba_acpi.c: Add key_entry for a lone FN keypress
2010-10-26 15:56 ` Dmitry Torokhov
@ 2010-10-26 23:24 ` Jon Dowland
2010-11-24 16:48 ` Matthew Garrett
0 siblings, 1 reply; 8+ messages in thread
From: Jon Dowland @ 2010-10-26 23:24 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: Matthew Garrett, platform-driver-x86, linux-kernel
On Tue, Oct 26, 2010 at 08:56:53AM -0700, Dmitry Torokhov wrote:
> > Add a key entry to map this event to a KEY_UNKNOWN keypress silences
>
> ^^^^^^
> Better fix commit log message as well. Otherwise:
>
> Acked-by: Dmitry Torokhov <dtor@mail.ru>
Thanks.
Signed-off-by: Jon Dowland <jmtd@debian.org>
----
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.
diff --git a/drivers/platform/x86/toshiba_acpi.c b/drivers/platform/x86/toshiba_acpi.c
index 06f304f..e10747a 100644
--- a/drivers/platform/x86/toshiba_acpi.c
+++ b/drivers/platform/x86/toshiba_acpi.c
@@ -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 } },
^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] toshiba_acpi.c: Add key_entry for a lone FN keypress
2010-10-26 23:24 ` Jon Dowland
@ 2010-11-24 16:48 ` Matthew Garrett
0 siblings, 0 replies; 8+ messages in thread
From: Matthew Garrett @ 2010-11-24 16:48 UTC (permalink / raw)
To: Jon Dowland; +Cc: Dmitry Torokhov, platform-driver-x86, linux-kernel
Applied, thanks (although there was some trailing whitespace that I've
cleaned up)
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2010-11-24 16:49 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-23 22:12 [PATCH] toshiba_acpi.c: Add key_entry for a lone FN keypress Jon Dowland
2010-10-25 18:27 ` Dmitry Torokhov
2010-10-25 18:42 ` Azael Avalos
2010-10-26 12:06 ` Jon Dowland
2010-10-26 12:00 ` Jon Dowland
2010-10-26 15:56 ` Dmitry Torokhov
2010-10-26 23:24 ` Jon Dowland
2010-11-24 16:48 ` Matthew Garrett
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).