X86 platform drivers
 help / color / mirror / Atom feed
From: Marek Vasut <marek.vasut@gmail.com>
To: joeyli <jlee@suse.com>
Cc: platform-driver-x86@vger.kernel.org
Subject: Re: Acer-WMI: Iconia TAB W500 gyrosensor
Date: Mon, 28 May 2012 00:47:27 +0200	[thread overview]
Message-ID: <201205280047.27466.marek.vasut@gmail.com> (raw)
In-Reply-To: <201205272358.14249.marek.vasut@gmail.com>

Dear joeyli,

> > 於 日,2012-05-27 於 23:45 +0800,joeyli 提到:
> > 
> > > 於 日,2012-05-27 於 10:28 +0200,Marek Vasut 提到:
> > > 
> > > > Dear joeyli,
> > > > 
> > > > > > Hi Marek,
> > > > > > 
> > > > > > 於 一,2012-05-07 於 21:38 +0200,Marek Vasut 提到:
> > > > > > 
> > > > > > > > > > Now it gets interesting ;-)
> > > > > > > > > > 
> > > > > > > > > > The obj->buffer.pointer contains the following:
> > > > > > > > > > 0x05 0x01 0x00 0x00 0x00 0x00 0x00 0x00
> > > > > > > > > > 
> > > > > > > > > > That means, return_value.function is 0x05, instead of
> > > > > > > > > > 0x01 (WMID_HOTKEY_EVENT).
> > > > > > > > > 
> > > > > > > > > Yes, the 0x05 event is a event reflect to g-sensor, but I
> > > > > > > > > don't have any hardware can test it.
> > > > > > > > > 
> > > > > > > > > Did you see any other value but not just "0x05 0x01 0x00
> > > > > > > > > 0x00 0x00 0x00 0x00 0x00" ?
> > > > > > > > 
> > > > > > > > Nope, nothing at all. I flipped it back and forth, no result
> > > > > > > > :(
> > > > > > > > 
> > > > > > > > > I mean if you invert your table, did you see other return
> > > > > > > > > value? The return data must point to Portrait or Landscape
> > > > > > > > > view.
> > > > > > > > 
> > > > > > > > Nope, still zeroes. This is only some interrupt-like event I
> > > > > > > > believe. My opinion is, I need to call some WMI method to
> > > > > > > > actually read-back the data.
> > 
> > ...
> > 
> > > > > > Sorry! I am sticking on another critical issue. I will find a
> > > > > > time to trace TAB's DSDT at this week.
> > > > > 
> > > > > No need to be sorry, I know exactly what you mean :) No need to
> > > > > rush, I'm stuck with a few bugs at work too.
> > > > 
> > > > Hi, I'm starting to get curious again. Did you had time to look into
> > > > it? Thanks in advance!
> > > 
> > > Sorry for I am late to reply you!
> > 
> > ...
> > 
> > > I checked your DSDT, unfortunately I found the logic is empty for
> > > G-sesor in W500's DSDT.
> > > 
> > > I mean, that's right we got only g-sensor event but didn't have sensor
> > > state data, because they didn't put the return value in DSDT!
> > > 
> > > On you TAB W500, the _Q7C method should run by EC when G-sensor
> > > detected
> > > 
> > > state change:
> > >         Method (_Q7C, 0, NotSerialized)
> > >         {
> > >         
> > >             If (LEqual (^^SENR.GSLC, Zero))                     /* G
> > >             sensor enabled? */ {
> > >             
> > >                 Store (0x05, Index (^^^WMID.FEBC, Zero))        /* 0x05
> > >                 is Sensor Event */ Store (One, Index (^^^WMID.FEBC,
> > >                 One))          /* 0x01 is G-Sensor */ Notify (WMID,
> > >                 0xBC)
> > >             
> > >             }
> > >             
> > >             If (LMST)
> > >             {
> > >             
> > >                 Return (Zero)
> > >             
> > >             }
> > >         
> > >         }
> > > 
> > > You can enable ACPI debug message to verify _Q7C method run when you
> > > reverse TAB, add the
> > > 
> > > following kernel parameter and reboot:
> > >  acpi.debug_level=0x0000000F acpi.debug_layer=0xffffffff log_buf_len=5M
> > > 
> > > The WMI event code in DSDT like this:
> > >             Method (EVBC, 0, NotSerialized)             /* call by _WED
> > >             */ {
> > > 
> > > ...
> > > 
> > >                 If (LEqual (Local0, One))               /* hotkey event
> > >                 */ {
> > > 
> > > ...
> > > 
> > >                         If (LEqual (Local0, 0x05)) {}
> > >                         /* 0x05 is Sensor Event, why empty? */
> > > 
> > > ...
> > > 
> > >                 Store (Zero, Index (FEBC, 0x04))		/* all set to
> 
> zero */
> 
> > >                 Store (Zero, Index (FEBC, 0x05))
> > >                 Store (Zero, Index (FEBC, 0x06))
> > >                 Store (Zero, Index (FEBC, 0x07))
> > > 
> > > ...
> > > 
> > >                 Return (FEBC)
> > >             
> > >             }
> > > 
> > > That's why we receive a G-sensor event but didn't have orientation
> > > information of TAB. On windows platform, I believe there have another
> > > driver listen and handle this g-sensor event when tab turned.
> > 
> > OK, there havse a "BST0001" acpi device should handle by a g-sensor
> > 
> > driver or a special acpi driver:
> >     Scope (_SB.PCI0.LPC0)
> >     {
> >     
> >         Device (SENR)
> >         {
> >         
> >             Name (_HID, "BST0001")
> >             Name (_UID, Zero)
> >             Name (_STA, 0x0F)
> >             Name (GSLC, Zero)           /* G-sensor lock? */
> >             Name (GSLX, Zero)		/* X */
> >             Name (GSLY, Zero)		/* Y */
> >             Name (GSLZ, Zero)		/* Z */
> > 
> > ...
> > 
> >             Method (_INI, 0, NotSerialized)
> > 
> > ...
> > 
> >             Method (RDST, 0, NotSerialized)
> >             {
> > 
> > ...
> > 
> >             Method (RDVL, 0, NotSerialized)
> >             {
> > 
> > ...
> > 
> >             Method (WRVL, 1, NotSerialized)
> >             {
> > 
> > ...
> > 
> > 
> > There have 3 methods "RDST", "RDVL" and "WRVL", currently, no idea for
> > what functions provided by those 3 methods.
> > 
> > my _GUESS_:
> > 	"RDST" is read state?
> > 	"RDVL" is read value(what!?)
> > 	"WRVL" is write value?
> > 
> > My idea is just find out which method is for read the orientation of
> > G-sensor then we can use a driver raise it to userland.
> 
> Well, I'm getting somewhere, thanks for all your hints, they really blasted
> me forward!
> 
> So, calling the _INI function, I get value of the G-Sensor kill switch
> (there's a toggle on the bottom of the tablet to enable/disable input from
> the accelerometer). So _INI returns integer, 0 for GS enabled, 1 for GS
> disabled. I didn't get further (yet). Will keep you in loop!
> 
> Thanks!

Ok, I'm even getting values from RDVL now. I hope to come up with a patch soon.

> 
> > Thanks a lot!
> > Joey Lee

      reply	other threads:[~2012-05-27 22:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-01 15:31 Acer-WMI: Iconia TAB W500 gyrosensor Marek Vasut
2012-05-02  1:37 ` joeyli
     [not found]   ` <201205020446.41735.marek.vasut@gmail.com>
2012-05-07 19:38     ` Marek Vasut
     [not found] ` <1336436380.5272.5047.camel@linux-s257.site>
     [not found]   ` <201205080345.44070.marek.vasut@gmail.com>
     [not found]     ` <201205271028.55484.marek.vasut@gmail.com>
     [not found]       ` <1338133547.9751.3824.camel@linux-s257.site>
2012-05-27 16:21         ` joeyli
2012-05-27 21:58           ` Marek Vasut
2012-05-27 22:47             ` Marek Vasut [this message]

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=201205280047.27466.marek.vasut@gmail.com \
    --to=marek.vasut@gmail.com \
    --cc=jlee@suse.com \
    --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