linux-acpi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Florian Echtler <floe@butterbrot.org>
To: Matthew Garrett <mjg59@srcf.ucam.org>
Cc: Corentin Chary <corentin.chary@gmail.com>,
	linux-acpi@vger.kernel.org, platform-driver-x86@vger.kernel.org
Subject: Re: Looking for some pointers on WMI/EC access
Date: Thu, 22 Apr 2010 10:21:28 +0200	[thread overview]
Message-ID: <1271924488.3790.25.camel@flunder> (raw)
In-Reply-To: <20100421143239.GA484@srcf.ucam.org>

[-- Attachment #1: Type: text/plain, Size: 1484 bytes --]

> > If that's correct so far, couldn't I just print the EC event code in
> > acpi_ec_sync_query and see what it's spitting out on hotkey press?
> Yes, that should work.
I tried exactly that, and one could say that it was 50% successful. One
of the hotkeys triggers an EC event 0x95, which should lead to the following
ACPI call chain:

// upper hotkey (touchpad)
Method (_Q95, 0, NotSerialized)
{
	Store (0x95, P80H)
	\_SB.WMI2.CMD3 (0x86)
}

Method (CMD3, 1, NotSerialized)
{
	CMD0 (0x19, 0x01, 0x01, 0x01, Arg0)
}

Method (CMD0, 5, Serialized)
{
	If (LAnd (ERQ0, LEqual (Arg2, 0x01)))
	{
		Store (Arg0, EVID)
		Store (Arg1, ACID)
		Store (Arg4, DA01)
		Notify (\_SB.WMI2, 0x80)
	}
	Else
	{
		Acquire (MCD0, 0xFFFF)
		UWED (Arg0, Arg1, Arg4)
		Release (MCD0)
	}
}

So it would be all joy and happiness if it weren't for the fact that
ERQ0 is initialized to zero and is never changed anywhere else.. I'll
give the VPC0._CFG method a try later today and see if that changes
anything.

What's also confusing is that while there's an EC register (0xE6) which
nicely reflects all of the hotkeys' state as a bitmask, one of them
doesn't trigger an EC event. I'm reluctant to just write stuff to the EC
registers, but maybe one of you can make some sense of the attached
hexdump - it says "SANYO" somewhere in there, does that ring a bell?

Since I've seen that lenovo-sl-laptop also just uses polling at 5 Hz to
handle the hotkeys, I'm sort of leaning towards that solution now..

Florian

[-- Attachment #2: button_both.hex --]
[-- Type: text/plain, Size: 1196 bytes --]

00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000010  00 00 00 00 00 00 00 00  00 80 16 20 53 41 4e 59  |........... SANY|
00000020  4f 00 31 33 00 00 00 00  00 00 00 00 00 00 00 00  |O.13............|
00000030  00 00 00 00 00 00 00 00  00 00 00 00 08 00 00 00  |................|
00000040  82 03 00 75 40 00 00 00  00 00 00 00 00 00 00 00  |...u@...........|
00000050  00 00 00 00 00 00 00 00  33 2d 00 00 00 00 00 00  |........3-......|
00000060  00 00 00 00 01 11 05 05  00 00 01 11 00 00 00 00  |................|
00000070  00 45 00 14 00 c0 00 4a  09 77 00 00 02 30 00 00  |.E.....J.w...0..|
00000080  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000000a0  00 0a 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000000b0  00 00 00 00 00 00 00 00  90 00 00 00 00 00 03 fd  |................|
000000c0  00 8b fb f1 14 1f 1d 00  00 00 00 00 00 00 00 00  |................|
000000d0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000000e0  20 1c 00 00 00 00 c2 00  00 80 00 00 00 00 00 00  | ...............|
000000f0  00 00 00 00 fc 22 00 00  00 00 00 00 00 00 00 00  |....."..........|
00000100

  reply	other threads:[~2010-04-22  8:21 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-04-17 15:37 Looking for some pointers on WMI/EC access Florian Echtler
2010-04-18 19:21 ` Corentin Chary
2010-04-19 14:25   ` Florian Echtler
2010-04-19 15:46     ` Corentin Chary
     [not found]       ` <1271746353.16585.9.camel@flunder>
2010-04-20  7:21         ` Corentin Chary
2010-04-20  7:30           ` Corentin Chary
2010-04-20 11:21             ` Florian Echtler
2010-04-20 12:09               ` Corentin Chary
2010-04-21 12:46                 ` Florian Echtler
2010-04-21 13:33                   ` Matthew Garrett
2010-04-21 14:30                     ` Florian Echtler
2010-04-21 14:32                       ` Matthew Garrett
2010-04-22  8:21                         ` Florian Echtler [this message]
2010-04-22 13:36                           ` Matthew Garrett
     [not found]                             ` <1271944219.29664.42.camel@pancake.fritz.box>
2010-04-22 13:53                               ` Matthew Garrett
2010-04-22 14:05                                 ` Matthew Garrett
2010-04-23 11:24                                   ` Florian Echtler
2010-04-23 17:47                                     ` Matthew Garrett
2010-04-22 14:33                                 ` Corentin Chary

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1271924488.3790.25.camel@flunder \
    --to=floe@butterbrot.org \
    --cc=corentin.chary@gmail.com \
    --cc=linux-acpi@vger.kernel.org \
    --cc=mjg59@srcf.ucam.org \
    --cc=platform-driver-x86@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).