public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Florian Echtler <floe@butterbrot.org>
To: Corentin Chary <corentin.chary@gmail.com>
Cc: linux-acpi@vger.kernel.org, platform-driver-x86@vger.kernel.org
Subject: Re: Looking for some pointers on WMI/EC access
Date: Wed, 21 Apr 2010 14:46:01 +0200	[thread overview]
Message-ID: <1271853961.1537.1781.camel@pancake> (raw)
In-Reply-To: <m2i71cd59b01004200509ye8fa593xc7bd5b201d484046@mail.gmail.com>

Hello again,

> Hum .. maybe, the best way to know would be to dump it in various
> hardware states.
I've found some time yesterday to give it a try and first had a look at the EC
register space. I've actually managed to find a register which reflects
the state of the hotkeys - it's register 0xE6. I could probably now just
write a driver to poll this at 5 or 10 Hz and be done with it, but that
solution seems a little hackish. The EC register space is probably still
necessary for accelerometer access (I'll try to set the X/Y/ZALM bits to
1 later and see what happens), but I think for hotkeys, an event-based
solution would be better.

> >> > ERQ0 (present in BUF1) is compared to Arg2 (BY09) == 0x1
> >> > if true, it will store some values and call notify
> > So this would then trigger the WMI event in the driver, right?
> > I'd assume that EVID is the EVent ID - would make sense, since somewhere
> > in the embedded controller code, there's this snippet:
> >
> >        Method (_QEF, 0, NotSerialized)
> >        {
> >                Store (0xEF, P80H)
> >                \_SB.WMI2.CMD2 (0x2D, 0x01, 0x01)
> >        }
> >
> >        Method (_QF1, 0, NotSerialized)
> >        {
> >                Store (0xF1, P80H)
> >                \_SB.WMI2.CMD2 (0x2C, 0x01, 0x01)
> >        }
> >
> > AFAICT the problem might be that ERQ0 is never initialized.. so it's
> > probably zero from the start and the first code branch in CMD0 will
> > never be called.
> 
> ERQ0 is initialized here (with 0x00):
>                         Name (BUF1, Buffer (0x40)
AFAICT it's never accessed anywhere else, right? So it's going to sit
there at 0x00 and the Notify (\_SB.WMI2, 0x80) code will never be
called.

I still have a bit of confusion going on with respect to the difference
between WMI notifications and EC notifications. The Notify() call above
would trigger the WMI notification, but in what way would the kernel be
notified about something like the following:

	Method (_Q8F, 0, NotSerialized)
	{
		Store ("_Q8F : Hot Key Event", Debug)
		Store (0x8F, P80H)
		DSGO ()
		DSSV ()
		Store ("_Q8F : Hot Key Event Finished", Debug)
	}

IIRC all _Qxx methods are also some kind of notification system, right?

Thanks, Yours, Florian
-- 
0666 - Filemode of the Beast


  reply	other threads:[~2010-04-21 12:46 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 [this message]
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
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=1271853961.1537.1781.camel@pancake \
    --to=floe@butterbrot.org \
    --cc=corentin.chary@gmail.com \
    --cc=linux-acpi@vger.kernel.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