On Wed, 2014-06-18 at 16:45 -0700, Srinivas Pandruvada wrote: > On 06/18/2014 04:31 PM, Reyad Attiyat wrote: > > Hello Bastien Nocera, > > > > I'm not the best person to answer your questions but I will try and > > help. The best people to talk to would be Jonathan Cameron, the IIO > > maintainer, and Srinivas Pandruvada, the author of the hid-sensor-hub > > device drivers. I have CC'ed them for you to hopefully get a better > > response than what I can offer. > > > > Your device uses the same sensor hub, over usb, as my device does. I > > have a Microsoft Surface and it also uses many of the sensors found on > > the Lenovo Yoga. > > > >> 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? > > You can check a program called generic_buffer.c in > "drivers/staging/iio/Documentation". I have used this as a reference to > port to Android. > You don't need to poll, you can also check > "https://github.com/pfps/yoga-laptop/sensors " developed by Peter F. > Patel-Schneider. I've read this code, and in fact, I mentioned it in my original mail. I fail to see how this code isn't polling. It's also much more complicated than doing the same thing for a evdev accelerometer. -- To unsubscribe from this list: send the line "unsubscribe linux-iio" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html