Linux Input/HID development
 help / color / mirror / Atom feed
From: Anisse Astier <anisse@astier.eu>
To: Bastien Nocera <hadess@hadess.net>
Cc: linux-input@vger.kernel.org, platform-driver-x86@vger.kernel.org,
	Dmitry Torokhov <dtor@mail.ru>, Matthew Garrett <mjg@redhat.com>,
	Andy Ross <andy.ross@windriver.com>,
	Corentin Chary <corentin.chary@gmail.com>
Subject: Re: [RFC] Reporting "orientation changed" event
Date: Thu, 7 Apr 2011 18:44:11 +0200	[thread overview]
Message-ID: <20110407184411.7aec55b2@destiny.ordissimo> (raw)
In-Reply-To: <1302194258.12215.10.camel@novo.hadess.net>

On Thu, 07 Apr 2011 17:37:35 +0100, Bastien Nocera <hadess@hadess.net> wrote :

> On Thu, 2011-04-07 at 18:18 +0200, Anisse Astier wrote:
> > Pegatron Lucid tablet sends an ACPI hotkey event(0xEA) when the
> > accelerometer detects coarse orientation change. My initial thought was
> > to just translate this event into KEY_DIRECTION, which seems to be the
> > norm from what we can see in hp-wmi driver. (See patch below for an
> > implementation.)
> > 
> > But this isn't just a key per se like on the HP touchsmart tablet, this
> > is an event that is triggered when the device is rotated.
> > 
> > This could be defined as a new Misc (EV_MSC) event:
> > MSC_ORIENTATION_CHANGED ?
> > 
> > Or we could use the upcoming IIO subsystem which is supposed to be for
> > sensors, but then we'd have a mismatch between the device based on ACPI
> > with firmware in the middle (driver submitted by Andy Ross) and the
> > purpose of IIO ("SPI or I2C device").
> 
> How would one know which orientation the device is now in, either from
> the event, or when the orientation already changed? How would this be
> "key" to user-space in general, and X in particular?
> 

There's an accelerometer driver (the one I referenced as submitted by
Andy Ross), but it only works in polling mode (input-polled). With this
event, userspace doesn't have to use this polled device until orientation
changes, hence saving CPU, power, etc.

See http://www.spinics.net/lists/platform-driver-x86/msg01682.html for
the patches.

Regards,

Anisse

  reply	other threads:[~2011-04-07 16:44 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-07 16:18 [RFC] Reporting "orientation changed" event Anisse Astier
2011-04-07 16:37 ` Bastien Nocera
2011-04-07 16:44   ` Anisse Astier [this message]
2011-04-07 17:01 ` Jonathan Cameron
2011-04-07 17:19   ` Anisse Astier
2011-05-09 14:38 ` Matthew Garrett
2011-05-09 15:37   ` Andy Ross
2011-05-09 15:47     ` Matthew Garrett
2011-05-09 15:59       ` Andy Ross
2011-05-09 16:30         ` Anisse Astier
2011-05-09 16:40         ` Matthew Garrett
2011-05-09 17:58           ` Anisse Astier
2011-05-09 18:06             ` Matthew Garrett

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=20110407184411.7aec55b2@destiny.ordissimo \
    --to=anisse@astier.eu \
    --cc=andy.ross@windriver.com \
    --cc=corentin.chary@gmail.com \
    --cc=dtor@mail.ru \
    --cc=hadess@hadess.net \
    --cc=linux-input@vger.kernel.org \
    --cc=mjg@redhat.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