* Accelerometer and orientation sensor on Lenovo Ideapad S10-3t
@ 2011-05-26 18:27 Alberto Mardegan
2011-05-27 16:33 ` Matthew Garrett
2011-05-28 12:03 ` Richard Schütz
0 siblings, 2 replies; 8+ messages in thread
From: Alberto Mardegan @ 2011-05-26 18:27 UTC (permalink / raw)
To: platform-driver-x86; +Cc: Javier S. Pedro, Ike Panhc
Hi all,
I'd like to add support for the accelerometer sensor which is found in
the Lenovo Ideapad S10-3t.
I would use this code as a starting point (kudos to Javier):
http://gitorious.org/iaps/lsrot/blobs/master/lsrot.c
The code uses the WMI interfaces to get notified of coarse orientation
changes.
But how should these changes be reported to userspace? Should they go
through the input subsystem (I didn't find any suitable key codes to
report these events), or via the /sys filesystem? In the latter case, is
there a convention on naming and reporting data from devices of this kind?
Secondly, I'd like to add support for reading the accelerometer values,
as it's done here (again, kudos to Javier):
http://gitorious.org/iaps/iaps/blobs/master/iaps.c
I know that no one is happy of directly accessing the raw I/O ports, but
all my attempts of reading these values through the ACPI interfaces or
the EC fields have failed: the fields are always set to 0.
So, what I plan to do is to check the DMI information, and if the
machine is a S10-3t I would you the code linked above to read and report
the accelerometer values. Would that be acceptable?
And finally: should the changes above be made to the existing
ideapad-laptop.c file, or should they go to a separate file/module?
TIA,
Alberto
--
http://blog.mardy.it <- geek in un lingua international!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Accelerometer and orientation sensor on Lenovo Ideapad S10-3t
2011-05-26 18:27 Accelerometer and orientation sensor on Lenovo Ideapad S10-3t Alberto Mardegan
@ 2011-05-27 16:33 ` Matthew Garrett
2011-05-28 7:15 ` Alberto Mardegan
2011-06-08 8:52 ` Anisse Astier
2011-05-28 12:03 ` Richard Schütz
1 sibling, 2 replies; 8+ messages in thread
From: Matthew Garrett @ 2011-05-27 16:33 UTC (permalink / raw)
To: Alberto Mardegan; +Cc: platform-driver-x86, Javier S. Pedro, Ike Panhc
On Thu, May 26, 2011 at 09:27:30PM +0300, Alberto Mardegan wrote:
> I would use this code as a starting point (kudos to Javier):
> http://gitorious.org/iaps/lsrot/blobs/master/lsrot.c
> The code uses the WMI interfaces to get notified of coarse orientation
> changes.
> But how should these changes be reported to userspace? Should they go
> through the input subsystem (I didn't find any suitable key codes to
> report these events), or via the /sys filesystem? In the latter case, is
> there a convention on naming and reporting data from devices of this kind?
If we're not interested in providing continual fine-grained data then
the easiest approach may be to present as an input device and then just
send updated values whenever you receive the coarse udpate signal. But
you probably want to bring this up on LKML so we can make sure
everyone's exposing this in the same way.
> Secondly, I'd like to add support for reading the accelerometer values,
> as it's done here (again, kudos to Javier):
> http://gitorious.org/iaps/iaps/blobs/master/iaps.c
> I know that no one is happy of directly accessing the raw I/O ports, but
> all my attempts of reading these values through the ACPI interfaces or
> the EC fields have failed: the fields are always set to 0.
Does the accelerometer appear as an ACPI device?
> And finally: should the changes above be made to the existing
> ideapad-laptop.c file, or should they go to a separate file/module?
ideapad-laptop seems appropriate, unless the accelerometer is its own
ACPI device that appears in other hardware as well.
--
Matthew Garrett | mjg59@srcf.ucam.org
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Accelerometer and orientation sensor on Lenovo Ideapad S10-3t
2011-05-27 16:33 ` Matthew Garrett
@ 2011-05-28 7:15 ` Alberto Mardegan
2011-06-08 8:52 ` Anisse Astier
1 sibling, 0 replies; 8+ messages in thread
From: Alberto Mardegan @ 2011-05-28 7:15 UTC (permalink / raw)
To: Matthew Garrett; +Cc: platform-driver-x86, Javier S. Pedro, Ike Panhc
On 05/27/2011 07:33 PM, Matthew Garrett wrote:
> If we're not interested in providing continual fine-grained data then
> the easiest approach may be to present as an input device and then just
> send updated values whenever you receive the coarse udpate signal. But
> you probably want to bring this up on LKML so we can make sure
> everyone's exposing this in the same way.
OK, I will.
>> I know that no one is happy of directly accessing the raw I/O ports, but
>> all my attempts of reading these values through the ACPI interfaces or
>> the EC fields have failed: the fields are always set to 0.
>
> Does the accelerometer appear as an ACPI device?
No, I think it doesn't. There are some fields in the EC device which
might be related to it, but I tried to read them without luck.
Here's the DSDT, anyway:
http://www.mardy.it/archivos/DSDT.dsl
Ciao,
Alberto
--
http://blog.mardy.it <- geek in un lingua international!
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Accelerometer and orientation sensor on Lenovo Ideapad S10-3t
2011-05-27 16:33 ` Matthew Garrett
2011-05-28 7:15 ` Alberto Mardegan
@ 2011-06-08 8:52 ` Anisse Astier
2011-06-08 10:49 ` Alberto Mardegan
1 sibling, 1 reply; 8+ messages in thread
From: Anisse Astier @ 2011-06-08 8:52 UTC (permalink / raw)
To: Matthew Garrett
Cc: Alberto Mardegan, platform-driver-x86, Javier S. Pedro, Ike Panhc
On Fri, 27 May 2011 17:33:46 +0100, Matthew Garrett <mjg59@srcf.ucam.org> wrote :
> On Thu, May 26, 2011 at 09:27:30PM +0300, Alberto Mardegan wrote:
>
> > I would use this code as a starting point (kudos to Javier):
> > http://gitorious.org/iaps/lsrot/blobs/master/lsrot.c
> > The code uses the WMI interfaces to get notified of coarse orientation
> > changes.
> > But how should these changes be reported to userspace? Should they go
> > through the input subsystem (I didn't find any suitable key codes to
> > report these events), or via the /sys filesystem? In the latter case, is
> > there a convention on naming and reporting data from devices of this kind?
>
> If we're not interested in providing continual fine-grained data then
> the easiest approach may be to present as an input device and then just
> send updated values whenever you receive the coarse udpate signal. But
> you probably want to bring this up on LKML so we can make sure
> everyone's exposing this in the same way.
>
We already had this discussion here:
http://www.spinics.net/lists/platform-driver-x86/msg01850.html
and the conclusion was that if you need to poll the device to get the
fined grain data, and you have a separate event(was ACPI hotkey, not
WMI) for coarse orientation changes, you should send a KOBJ_CHANGE uevent
for that.
IMHO, deciding if we need or not "continual fine-grained data" is policy
and up to userspace.
--
Anisse
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Accelerometer and orientation sensor on Lenovo Ideapad S10-3t
2011-05-26 18:27 Accelerometer and orientation sensor on Lenovo Ideapad S10-3t Alberto Mardegan
2011-05-27 16:33 ` Matthew Garrett
@ 2011-05-28 12:03 ` Richard Schütz
2011-06-01 7:23 ` Ike Panhc
1 sibling, 1 reply; 8+ messages in thread
From: Richard Schütz @ 2011-05-28 12:03 UTC (permalink / raw)
To: Alberto Mardegan; +Cc: platform-driver-x86, Javier S. Pedro, Ike Panhc
On 05/26/11 20:27, Alberto Mardegan wrote:
> Secondly, I'd like to add support for reading the accelerometer values,
> as it's done here (again, kudos to Javier):
> http://gitorious.org/iaps/iaps/blobs/master/iaps.c
> I know that no one is happy of directly accessing the raw I/O ports, but
> all my attempts of reading these values through the ACPI interfaces or
> the EC fields have failed: the fields are always set to 0.
> So, what I plan to do is to check the DMI information, and if the
> machine is a S10-3t I would you the code linked above to read and report
> the accelerometer values. Would that be acceptable?
I'm wondering if the accelerometer driver is also compatible with the
ThinkPad SL laptops. It is said that their firmwares are quite similar
to the IdeaPad ones. As they have quasi nothing in common with the
normal ThinkPad series there's no support for them in
thinkpad-acpi/hdaps/tp_smapi.
I compiled the iaps module and loaded it successfully on my ThinkPad SL.
There is also data passed by the driver to the input subsystem, when I
move the laptop. Is there a way to validate this data?
--
Regards,
Richard Schütz
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Accelerometer and orientation sensor on Lenovo Ideapad S10-3t
2011-05-28 12:03 ` Richard Schütz
@ 2011-06-01 7:23 ` Ike Panhc
2011-06-01 19:29 ` Richard Schütz
0 siblings, 1 reply; 8+ messages in thread
From: Ike Panhc @ 2011-06-01 7:23 UTC (permalink / raw)
To: Richard Schütz
Cc: Alberto Mardegan, platform-driver-x86, Javier S. Pedro
On 05/28/2011 08:03 PM, Richard Schütz wrote:
> On 05/26/11 20:27, Alberto Mardegan wrote:
>> Secondly, I'd like to add support for reading the accelerometer values,
>> as it's done here (again, kudos to Javier):
>> http://gitorious.org/iaps/iaps/blobs/master/iaps.c
>> I know that no one is happy of directly accessing the raw I/O ports, but
>> all my attempts of reading these values through the ACPI interfaces or
>> the EC fields have failed: the fields are always set to 0.
>> So, what I plan to do is to check the DMI information, and if the
>> machine is a S10-3t I would you the code linked above to read and report
>> the accelerometer values. Would that be acceptable?
>
> I'm wondering if the accelerometer driver is also compatible with the ThinkPad SL laptops. It is said that their firmwares are quite similar to the IdeaPad ones. As they have quasi nothing in common with the normal ThinkPad series there's no support for them in thinkpad-acpi/hdaps/tp_smapi.
So far what I know is SL400 has similar firmware with asus-laptops, and other SL are using thinkpad-acpi.
I have a SL400 and tried to examine the DSDT but found nothing about accelerometer sensor.
>
> I compiled the iaps module and loaded it successfully on my ThinkPad SL. There is also data passed by the driver to the input subsystem, when I move the laptop. Is there a way to validate this data?
>
Which SL you have? If we can find out a standard interface, that will be good.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Accelerometer and orientation sensor on Lenovo Ideapad S10-3t
2011-06-01 7:23 ` Ike Panhc
@ 2011-06-01 19:29 ` Richard Schütz
0 siblings, 0 replies; 8+ messages in thread
From: Richard Schütz @ 2011-06-01 19:29 UTC (permalink / raw)
To: Ike Panhc; +Cc: Alberto Mardegan, platform-driver-x86, Javier S. Pedro
On 06/01/2011 09:23, Ike Panhc wrote:
> On 05/28/2011 08:03 PM, Richard Schütz wrote:
>> On 05/26/11 20:27, Alberto Mardegan wrote:
>>> Secondly, I'd like to add support for reading the accelerometer values,
>>> as it's done here (again, kudos to Javier):
>>> http://gitorious.org/iaps/iaps/blobs/master/iaps.c
>>> I know that no one is happy of directly accessing the raw I/O ports, but
>>> all my attempts of reading these values through the ACPI interfaces or
>>> the EC fields have failed: the fields are always set to 0.
>>> So, what I plan to do is to check the DMI information, and if the
>>> machine is a S10-3t I would you the code linked above to read and report
>>> the accelerometer values. Would that be acceptable?
>>
>> I'm wondering if the accelerometer driver is also compatible with the ThinkPad SL laptops. It is said that their firmwares are quite similar to the IdeaPad ones. As they have quasi nothing in common with the normal ThinkPad series there's no support for them in thinkpad-acpi/hdaps/tp_smapi.
>
> So far what I know is SL400 has similar firmware with asus-laptops, and other SL are using thinkpad-acpi.
The EC of the ThinkPad SL laptops is from ASUSTeK as far as I know. At
least it looks like that in the DSDT. So asus-laptop handles some
hotkeys. No ThinkPad SL can be handled by thinkpad-acpi, because they
are totally different.
Features like bluetooth rfkill and accessing the blue LED in the Lenovo
Care button are still not supported ([1] can do that, but never was
accepted for the kernel).
> I have a SL400 and tried to examine the DSDT but found nothing about accelerometer sensor.
There should be an accelerometer in your SL400. Try the driver mentioned
in this thread.
>>
>> I compiled the iaps module and loaded it successfully on my ThinkPad SL. There is also data passed by the driver to the input subsystem, when I move the laptop. Is there a way to validate this data?
>>
>
> Which SL you have? If we can find out a standard interface, that will be good.
I have a SL500. It looks like the mailing list disliked my attached
DSDT. What are the limitations on this? It is available under [2] now.
[1] https://github.com/tetromino/lenovo-sl-laptop
[2] http://richard.qasl.de/DSDT.dsl
--
Regards,
Richard Schütz
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-06-08 10:49 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-26 18:27 Accelerometer and orientation sensor on Lenovo Ideapad S10-3t Alberto Mardegan
2011-05-27 16:33 ` Matthew Garrett
2011-05-28 7:15 ` Alberto Mardegan
2011-06-08 8:52 ` Anisse Astier
2011-06-08 10:49 ` Alberto Mardegan
2011-05-28 12:03 ` Richard Schütz
2011-06-01 7:23 ` Ike Panhc
2011-06-01 19:29 ` Richard Schütz
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.