From: joeyli <jlee@suse.com>
To: Marek Vasut <marex@denx.de>
Cc: platform-driver-x86@vger.kernel.org
Subject: Re: [PATCH] ACER: Add support for accelerometer sensor
Date: Tue, 29 May 2012 16:00:02 +0800 [thread overview]
Message-ID: <1338278402.9751.4201.camel@linux-s257.site> (raw)
In-Reply-To: <201205290722.50810.marex@denx.de>
於 二,2012-05-29 於 07:22 +0200,Marek Vasut 提到:
> Dear joeyli,
>
> > Hi Marek,
> >
> > 於 一,2012-05-28 於 12:34 +0200,Marek Vasut 提到:
> >
>
> [...]
> > information about BST0001 and RDVL. I think BST0001 is a special device
> > handle by G-sensor driver on Windows.
> >
> > But, as our trace on W500 TAB, they didn't return this information
> > through wmi event.
> >
> > Currently, only way is GUESS what's the result from RDVL.
>
> Well, I finally figured that out. It's a rotation vector sensor, the result is
> sin(angle) in x/y/z direction.
>
> It maps to this rotation around a ball:
> http://developer.android.com/reference/android/hardware/SensorEvent.html (see
> Sensor.TYPE_ROTATION_VECTOR: )
>
I see!
Per my colleague's information, udev should calculate orientation and
raise it to X-window.
> >
> > For how to detect G-sensor in machine, BIOS write the device information
> > to type ABh in POST stage, on your machine like this:
> >
> > OEM-specific Type
> > Header and Data:
> > AB 27 19 00 01 02 10 04 98 05 02 10 83 43 07 8C
> > 16 2B 00 03 DA 0B 38 01 04 4E 06 0C D2 04 4E 06
> > 0C D2 08 F3 0C 19 E0
> >
> > You can reference my type_aa_dmi_decode function in acer-wmi to parse
> > type AB:
> >
> > The format is:
> > offset 00: type AB
> > offset 01: length 27
> > offset 02 (WORD): Handle
> >
> > Then, follow many devices type and vid/pid, on your machine:
> >
> > 05 02 10 83 43
> > 05 = Audio
> > 1002 = VID
> > 4383 = PID
> >
> > 07 8C 16 2B 00
> > 07 = Wireless LAN
> > 168C
> > 002B
> > ...
> >
> > We can guess what's the device type through vid/pid.
> > Per their document, G-sensor's type is 0x0E, but, I didn't see this
> > device from your dmidecode log. It should like this:
> >
> > 0E xx xx xx xx
> >
> > Did you disable G-sensor when you capture dmidecode log?
>
> I don't think it's possible to disable it, it's always enabled it seems to me.
> It's only possible to flip a switch that makes it stop producing ACPI events.
>
I am not sure does it possible walk through pci or USB bus to detect
G-sensor exist?
If not, then the only one way is always run acer_wmi_accel_setup() to
detect "BST0001" exist or not.
Thanks a lot!
Joey Lee
prev parent reply other threads:[~2012-05-29 8:04 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-27 23:44 [PATCH] ACER: Add support for accelerometer sensor Marek Vasut
2012-05-28 6:10 ` joeyli
2012-05-28 6:19 ` Marek Vasut
[not found] ` <201205281234.15981.marex@denx.de>
[not found] ` <1338257194.9751.4158.camel@linux-s257.site>
[not found] ` <201205290722.50810.marex@denx.de>
2012-05-29 8:00 ` joeyli [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=1338278402.9751.4201.camel@linux-s257.site \
--to=jlee@suse.com \
--cc=marex@denx.de \
--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