linux-input.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Matthew Garrett <mjg59@srcf.ucam.org>
To: Andy Ross <andy.ross@windriver.com>
Cc: Anisse Astier <anisse@astier.eu>,
	linux-input@vger.kernel.org, platform-driver-x86@vger.kernel.org,
	Dmitry Torokhov <dtor@mail.ru>,
	Corentin Chary <corentin.chary@gmail.com>
Subject: Re: [RFC] Reporting "orientation changed" event
Date: Mon, 9 May 2011 17:40:06 +0100	[thread overview]
Message-ID: <20110509164006.GA6570@srcf.ucam.org> (raw)
In-Reply-To: <4DC80F45.2040508@windriver.com>

On Mon, May 09, 2011 at 08:59:01AM -0700, Andy Ross wrote:
> On 05/09/2011 08:47 AM, Matthew Garrett wrote:
> > Yes, so the accelerometer driver should (in-kernel) know that a coarse 
> > orientation event has occured and then send an appropriate uevent to 
> > userspace indiciating that it has new data.
> 
> OK, so substituting udev for acpid, but otherwise leaving the
> input-polldev device alone.  That certainly sounds nice to me, though
> I'm not sure where the "dreadful / don't do that" advice is directed
> as the handling in userspace will be virtual identical (moving the
> dbus-send from the acpid event file into a udev rule).

It shouldn't even be a dbus send - something in userspace should just be 
listening for event notifications on the accelerometer. Use udev 
directly.

> > I'm going to NAK anything that reports "Coarse orientation change"
> > to userspace without providing any context.
> 
> Just to be clear: there's no kernel code to NAK here.  The acpid hook
> is raw, and in userspace.  It's not clean, but it's also a single-device
> fixup: seems to me to be pretty much exactly what apcid is for, no?

acpid is for dealing with cases where the kernel doesn't provide 
functionality that the kernel should provide. Arbitrary APCI events 
shouldn't be being delivered to userspace - they should be handled 
in-kernel and delivered through a meaningful mechanism in order to avoid 
cases where userspace needs to know about a platform implementation. In 
this case the right way for the event to hit userspace is as a generic 
message from the accelerometer, not as a device-specific ACPI event 
through a deprecated interface.

-- 
Matthew Garrett | mjg59@srcf.ucam.org

  parent reply	other threads:[~2011-05-09 16:40 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
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 [this message]
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=20110509164006.GA6570@srcf.ucam.org \
    --to=mjg59@srcf.ucam.org \
    --cc=andy.ross@windriver.com \
    --cc=anisse@astier.eu \
    --cc=corentin.chary@gmail.com \
    --cc=dtor@mail.ru \
    --cc=linux-input@vger.kernel.org \
    --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;
as well as URLs for NNTP newsgroup(s).