From: Bastien Nocera <hadess@hadess.net>
To: linux-iio@vger.kernel.org
Cc: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Subject: User-space API for accelerometer(s)?
Date: Wed, 18 Jun 2014 16:09:02 +0200 [thread overview]
Message-ID: <1403100542.30918.29.camel@nuvo> (raw)
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
next reply other threads:[~2014-06-18 14:09 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-06-18 14:09 Bastien Nocera [this message]
2014-06-18 23:31 ` User-space API for accelerometer(s)? 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
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=1403100542.30918.29.camel@nuvo \
--to=hadess@hadess.net \
--cc=benjamin.tissoires@redhat.com \
--cc=linux-iio@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).