Re: On a sony VAIO Z12C5E: sony-laptop: Unknown event: 0x100 0xa6, etc.

2010-11-27 Thread Dmitry Torokhov
On Thu, Nov 25, 2010 at 07:30:58AM +0900, Mattia Dongili wrote:
> On Wed, Nov 24, 2010 at 07:22:55PM +0100, Gyorgy Jeney wrote:
> > Hello,
> > 
> > On a Sony VAIO Z12C9E, I get some messages from the kernel when
> > certain buttons are pressed:
> > 
> > "Assist" pressed: sony-laptop: Unknown event: 0x100 0xa6
> > "Assist" released: sony-laptop: Unknown event: 0x100 0x26
> > "VAIO" pressed: sony-laptop: Unknown event: 0x100 0xa5
> > "VAIO" released: sony-laptop: Unknown event: 0x100 0x25
> 
> I wonder what keycodes we should associate these to... Maybe KEY_HELP
> and KEY_SETUP?

For VAIO key another option is "KEY_VENDOR".

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


Re: On a sony VAIO Z12C5E: sony-laptop: Unknown event: 0x100 0xa6, etc.

2010-11-25 Thread Mattia Dongili
On Thu, Nov 25, 2010 at 11:11:26PM +0100, Gyorgy Jeney wrote:
> On 24 November 2010 23:57, Gyorgy Jeney  wrote:
> > On 24 November 2010 23:30, Mattia Dongili  wrote:
> >> On Wed, Nov 24, 2010 at 07:22:55PM +0100, Gyorgy Jeney wrote:
> >>> make these events "do the right thing".
> >>
> >> yes, it's easy with the information you provided.
> >> The attached patch should get the keys reported on the input subsystem
> >> and show up on the event device (check with evtest) and X (check with
> >> xev).
> >
> > Thanks, I'll install your patch and test this tomorrow.
> 
> I patched a 2.6.37-rc3 kernel and it works perfectly for me.  I

Thanks

> noticed when applying the patch that there was an 8 line offset.  Does
> this mean there is newer version of sony-laptop.c than is available in
> 2.6.37-rc3?

No, it's just that the diff was not against a clean copy but against my
local version that has tiny adjustments that I never submitted.

Matthew,
Shall I reesend the patch with a proper subject or can you take the one
I posted earlier in this thread?

Thanks!
-- 
mattia
:wq!
--
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


Re: On a sony VAIO Z12C5E: sony-laptop: Unknown event: 0x100 0xa6, etc.

2010-11-25 Thread Gyorgy Jeney
On 24 November 2010 23:57, Gyorgy Jeney  wrote:
> On 24 November 2010 23:30, Mattia Dongili  wrote:
>> On Wed, Nov 24, 2010 at 07:22:55PM +0100, Gyorgy Jeney wrote:
>>> make these events "do the right thing".
>>
>> yes, it's easy with the information you provided.
>> The attached patch should get the keys reported on the input subsystem
>> and show up on the event device (check with evtest) and X (check with
>> xev).
>
> Thanks, I'll install your patch and test this tomorrow.

I patched a 2.6.37-rc3 kernel and it works perfectly for me.  I
noticed when applying the patch that there was an 8 line offset.  Does
this mean there is newer version of sony-laptop.c than is available in
2.6.37-rc3?

nog.
--
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


Re: On a sony VAIO Z12C5E: sony-laptop: Unknown event: 0x100 0xa6, etc.

2010-11-24 Thread Gyorgy Jeney
On 24 November 2010 23:30, Mattia Dongili  wrote:
> On Wed, Nov 24, 2010 at 07:22:55PM +0100, Gyorgy Jeney wrote:
>> CDROM eject key pressed: sony-laptop: Unknown event: 0x100 0xa4
>> CDROM eject key released: sony-laptop: Unknown event: 0x100 0x24
>>
>> What bothers me about this is I get a bunch of messages on my console
>> each time the DVD tray is opened, but I guess it shouldn't be hard to
>
> Humm, do you mean that you get that 0xa4 event when pressing the button
> _on_ the CD tray or is there an extra button somewhere that triggers
> that?

This model doesn't have a button on the tray.  The only eject button
is located above the keyboard to the right of the VAIO key.

>> make these events "do the right thing".
>
> yes, it's easy with the information you provided.
> The attached patch should get the keys reported on the input subsystem
> and show up on the event device (check with evtest) and X (check with
> xev).

Thanks, I'll install your patch and test this tomorrow.

> One last thing, to keep my DSDT list up-to-date would you mind sending
> me the dump of your laptop's DSDT table?

I was going to poke around with debug=1 added to the sony-laptop
module before sending that, but since you asked, I'll send this to you
privately now.

nog.
--
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


Re: On a sony VAIO Z12C5E: sony-laptop: Unknown event: 0x100 0xa6, etc.

2010-11-24 Thread Mattia Dongili
On Wed, Nov 24, 2010 at 07:22:55PM +0100, Gyorgy Jeney wrote:
> Hello,
> 
> On a Sony VAIO Z12C9E, I get some messages from the kernel when
> certain buttons are pressed:
> 
> "Assist" pressed: sony-laptop: Unknown event: 0x100 0xa6
> "Assist" released: sony-laptop: Unknown event: 0x100 0x26
> "VAIO" pressed: sony-laptop: Unknown event: 0x100 0xa5
> "VAIO" released: sony-laptop: Unknown event: 0x100 0x25

I wonder what keycodes we should associate these to... Maybe KEY_HELP
and KEY_SETUP?

> CDROM eject key pressed: sony-laptop: Unknown event: 0x100 0xa4
> CDROM eject key released: sony-laptop: Unknown event: 0x100 0x24
> 
> What bothers me about this is I get a bunch of messages on my console
> each time the DVD tray is opened, but I guess it shouldn't be hard to

Humm, do you mean that you get that 0xa4 event when pressing the button
_on_ the CD tray or is there an extra button somewhere that triggers
that?

> make these events "do the right thing".

yes, it's easy with the information you provided.
The attached patch should get the keys reported on the input subsystem
and show up on the event device (check with evtest) and X (check with
xev).

One last thing, to keep my DSDT list up-to-date would you mind sending
me the dump of your laptop's DSDT table?

commit fa7eab94364436a567e20792c678bc72b334a3e0
Author: Mattia Dongili 
Date:   Thu Nov 25 07:13:21 2010 +0900

sony-laptop: support additional hotkeys on the Z series

These new events were still unmapped in sony-laptop, add them and map them 
to
KEY_HELP, KEY_SETUP and KEY_EJECT respectively.

"Assist" pressed: sony-laptop: Unknown event: 0x100 0xa6
"Assist" released: sony-laptop: Unknown event: 0x100 0x26
"VAIO" pressed: sony-laptop: Unknown event: 0x100 0xa5
"VAIO" released: sony-laptop: Unknown event: 0x100 0x25
CDROM eject key pressed: sony-laptop: Unknown event: 0x100 0xa4
CDROM eject key released: sony-laptop: Unknown event: 0x100 0x24

Reported-by: Gyorgy Jeney 
Cc: Dmitry Torokhov 
Cc: Matthew Garrett 
Signed-off-by: Mattia Dongili 

diff --git a/drivers/platform/x86/sony-laptop.c 
b/drivers/platform/x86/sony-laptop.c
index 8eecf81..ce9b901 100644
--- a/drivers/platform/x86/sony-laptop.c
+++ b/drivers/platform/x86/sony-laptop.c
@@ -906,6 +906,12 @@ static struct sony_nc_event sony_100_events[] = {
{ 0x1f, SONYPI_EVENT_ANYBUTTON_RELEASED },
{ 0xa1, SONYPI_EVENT_MEDIA_PRESSED },
{ 0x21, SONYPI_EVENT_ANYBUTTON_RELEASED },
+   { 0xa4, SONYPI_EVENT_CD_EJECT_PRESSED },
+   { 0x24, SONYPI_EVENT_ANYBUTTON_RELEASED },
+   { 0xa5, SONYPI_EVENT_SETTINGKEY_PRESSED },
+   { 0x25, SONYPI_EVENT_ANYBUTTON_RELEASED },
+   { 0xa6, SONYPI_EVENT_HELP_PRESSED },
+   { 0x26, SONYPI_EVENT_ANYBUTTON_RELEASED },
{ 0, 0 },
 };
 
-- 
mattia
:wq!
--
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