I’m fairly new to kernel development and very new to iio,
I’m confused about the iio interface.
I see that with IIO there are two interfaces for the user:
- Expose values in sysfs (done with
INDIO_DIRECT_MODE
), where each channel can be read/written individually - Expose buffered values from /dev/iio:deviceN where channels values are packed into a sequence of bytes
I’m writing a driver for a mechanical device that can move, in the driver there’s a device with two channels:
- target position
- actual position
I would like to expose those value to the user directly (no need for sampling, just read/write values as the user reads/writes), so something like option (1.) above, but the sysfs files belong to root. What’s the best way to achieve this?