linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Bastien Nocera <hadess@hadess.net>
To: "linux-iio@vger.kernel.org" <linux-iio@vger.kernel.org>
Subject: User-space API again, detecting devices
Date: Fri, 09 Oct 2015 18:27:13 +0200	[thread overview]
Message-ID: <1444408033.28661.43.camel@hadess.net> (raw)

Hey,

I have a couple of bugs filed against iio-sensor-proxy where the
problem is in my code's wrong way of doing device detection.

I want to detect compasses, accelerometers, and ambient light sensors,
both those using triggers, and those that require polling. I'll try to
answer my own questions, and you can tell me whether I'm wrong.

To detect accelerometers:
- Check whether in_accel_x, in_accel_y and in_accel_z files exist

To detect ambient light sensors:
- Check whether in_intensity_both, or in_illuminance_input or
in_illuminance_raw exists (the intensity one looks wrong...)

To detect compasses:
- Check whether in_rot_from_north_magnetic_tilt_comp exists

To detect whether the device needs polling, or has a trigger, construct
a trigger name like <name>-dev<device number> for example, magn_3d-
dev0.

Is that all correct?

Cheers

             reply	other threads:[~2015-10-09 16:27 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-09 16:27 Bastien Nocera [this message]
2015-10-11 12:26 ` User-space API again, detecting devices Jonathan Cameron

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=1444408033.28661.43.camel@hadess.net \
    --to=hadess@hadess.net \
    --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).