All of lore.kernel.org
 help / color / mirror / Atom feed
* User-space API for accelerometer(s)?
@ 2014-06-18 14:09 Bastien Nocera
  2014-06-18 23:31 ` Reyad Attiyat
  0 siblings, 1 reply; 19+ messages in thread
From: Bastien Nocera @ 2014-06-18 14:09 UTC (permalink / raw)
  To: linux-iio; +Cc: Benjamin Tissoires

Hey,

I'm trying to integrate the accelerometer of the Lenovo Yoga into GNOME
and a modern desktop. The accelerometer is exported through an IIO
device as per:
https://github.com/pfps/yoga-laptop/blob/master/sensors/orientation.c

We already have some integration for accelerometers in udev/systemd and
GNOME, and they rely on the accelerometer being an input device, being
tagged with the ID_INPUT_ACCELEROMETER and sending out a kevent/uevent
when a major orientation change took place. This is handled by:
http://cgit.freedesktop.org/systemd/systemd/tree/src/udev/accelerometer/accelerometer.c
for the WeTab/Pegatron devices for example.

So, my question regarding the IIO user-space API is:
is it possible to make the IIO accelerometer send out a kevent when the
orientation changes in a major way (using triggers?) or does user-space
need to poll the device instead?

If the former, I intend on writing a small helper to set up the
accelerometer, and a helper similar to the one already in the udev tree.

If the latter, I'll probably write a long-running helper, which would
offer the same interface as the one used by the Pegatron accelerometer
driver, so that we don't need to make any more changes to user-space.

Cheers


^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2014-07-23 16:51 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-06-18 14:09 User-space API for accelerometer(s)? Bastien Nocera
2014-06-18 23:31 ` Reyad Attiyat
2014-06-18 23:45   ` Srinivas Pandruvada
2014-06-19 11:20     ` Bastien Nocera
2014-06-21 12:01       ` Jonathan Cameron
2014-06-21 12:37         ` Bastien Nocera
2014-06-21 16:26           ` Srinivas Pandruvada
2014-07-01 12:10         ` Bastien Nocera
2014-07-03 17:51           ` Jonathan Cameron
2014-07-03 17:58             ` Lars-Peter Clausen
2014-07-04  9:35             ` Bastien Nocera
2014-07-09 14:33             ` Bastien Nocera
2014-07-09 14:54               ` Peter Meerwald
2014-07-09 22:16                 ` Bastien Nocera
2014-07-10  1:38                   ` Peter F. Patel-Schneider
2014-07-10 15:04                     ` Srinivas Pandruvada
2014-07-23 12:19                       ` Bastien Nocera
2014-07-23 13:02                         ` Srinivas Pandruvada
2014-07-23 16:51                           ` Bastien Nocera

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.