linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* User-space API again, detecting devices
@ 2015-10-09 16:27 Bastien Nocera
  2015-10-11 12:26 ` Jonathan Cameron
  0 siblings, 1 reply; 2+ messages in thread
From: Bastien Nocera @ 2015-10-09 16:27 UTC (permalink / raw)
  To: linux-iio@vger.kernel.org

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

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

end of thread, other threads:[~2015-10-11 12:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-09 16:27 User-space API again, detecting devices Bastien Nocera
2015-10-11 12:26 ` Jonathan Cameron

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).