Re: [PATCH 1/2] input: Pegatron Lucid accelerometer

Started by Matthew Garrett on Jan 31, 2011 · 2 messages from 2 authors · Last reply Mar 18, 2011

open the first message on its own page

Message details and related content
On Tue, Jan 18, 2011 at 09:21:31AM -0800, Andy Ross wrote:
It's just an ACPI method interface, so no dedicated IRQ certainly.
The firmware does issue ACPI events on coarse orientation changes
(i.e. which edge is up) that we're catching with acpid, so there's no
reason this needs to poll all the time in typical usage.
It'd be good to provide those via some more generally-usable mechanism 
than raw ACPI events.

-- 
Matthew Garrett | mjg59-1xO5oi07KQx4cg9Nei1l7Q@public.gmane.org

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
Message details and related content
On Mon, 31 Jan 2011 21:30:57 +0000, Matthew Garrett [off-list ref] wrote :
On Tue, Jan 18, 2011 at 09:21:31AM -0800, Andy Ross wrote:
quoted
It's just an ACPI method interface, so no dedicated IRQ certainly.
The firmware does issue ACPI events on coarse orientation changes
(i.e. which edge is up) that we're catching with acpid, so there's no
reason this needs to poll all the time in typical usage.
It'd be good to provide those via some more generally-usable mechanism 
than raw ACPI events.
Something like that ?


From: Anisse Astier <redacted>
Subject: [PATCH] asus-laptop: Send input event when orientation changes on Pegatron Lucid

Pegatron Lucid tablet sends an ACPI event on coarse orientation changes.
Translate this into KEY_DIRECTION input event.

Signed-off-by: Anisse Astier <redacted>
---
 drivers/platform/x86/asus-laptop.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/drivers/platform/x86/asus-laptop.c b/drivers/platform/x86/asus-laptop.c
index 75c84f8..d32395c 100644
--- a/drivers/platform/x86/asus-laptop.c
+++ b/drivers/platform/x86/asus-laptop.c
@@ -312,6 +312,8 @@ static const struct key_entry asus_keymap[] = {
 	{KE_KEY, 0xc4, { KEY_KBDILLUMUP } },
 	{KE_KEY, 0xc5, { KEY_KBDILLUMDOWN } },
 	{KE_KEY, 0xb5, { KEY_CALC } },
+	/* Pegatron Lucid tablet specific */
+	{KE_KEY, 0xEA, { KEY_DIRECTION } }, /* Orientation changed */
 	{KE_END, 0},
 };
 
-- 
1.7.3.2
Keyboard shortcuts
hback out one level
jnext message in thread / next series-diff position
kprevious message in thread / previous series-diff position
ldrill in
Escclose help / fold thread tree
?toggle this help