On Fri, 27 May 2011 17:33:46 +0100, Matthew Garrett <[email protected]> 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
--
To unsubscribe from this list: send the line "unsubscribe platform-driver-x86" 
in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to