Re: [PATCH] ACER: Add support for accelerometer sensor

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



於 二,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
 


--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Kernel Development]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux