All of lore.kernel.org
 help / color / mirror / Atom feed
From: Peter Meerwald <pmeerw@pmeerw.net>
To: Bastien Nocera <hadess@hadess.net>
Cc: Jonathan Cameron <jic23@kernel.org>,
	Srinivas Pandruvada <srinivas.pandruvada@linux.intel.com>,
	Reyad Attiyat <reyad.attiyat@gmail.com>,
	linux-iio@vger.kernel.org,
	Benjamin Tissoires <benjamin.tissoires@redhat.com>,
	Lars-Peter Clausen <lars@metafoo.de>
Subject: Re: User-space API for accelerometer(s)?
Date: Wed, 9 Jul 2014 16:54:21 +0200 (CEST)	[thread overview]
Message-ID: <alpine.DEB.2.01.1407091644570.15209@pmeerw.net> (raw)
In-Reply-To: <1404916405.10032.3.camel@nuvo>

Hello Bastian,

> > We did also have a uinput based approach at one point but it was fairly clunky.
> > That took data from iio buffers and pushed it back into the kernel via inputs
> > userspace driver support. Not particularly nice but I thought I'd best mention
> > it!
> 
> This is how I went in the end:
> https://github.com/hadess/iio-sensor-proxy/
> 
> It's still far too resource hungry compared to the amount of work it's
> doing (1 full percent of CPU!), and the rotation is too sensitive.

if I read the code correctly, prepare_output() configures the trigger, 
enables the buffer, then performs one read, before undoing everything FOR 
EACH SAMPLE

this is probably not the way it should be done; I'd suggest to set up the 
IIO buffer and then poll() or block on /dev/iio:deviceX -- however, this 
uses the IIO device exclusively (might be an issue)

regards, p.

-- 

Peter Meerwald
+43-664-2444418 (mobile)

  reply	other threads:[~2014-07-09 14:54 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 [this message]
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=alpine.DEB.2.01.1407091644570.15209@pmeerw.net \
    --to=pmeerw@pmeerw.net \
    --cc=benjamin.tissoires@redhat.com \
    --cc=hadess@hadess.net \
    --cc=jic23@kernel.org \
    --cc=lars@metafoo.de \
    --cc=linux-iio@vger.kernel.org \
    --cc=reyad.attiyat@gmail.com \
    --cc=srinivas.pandruvada@linux.intel.com \
    /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 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.