0

The driver I'm developing has a number of settings I want the user to be able to change that don't really fit into the IIO framework. For example, using the IIO_CHAN_INFO_SAMP_FREQ enum in my read function exposes a variable in /sys/bus/iio/devices/iio:device0/ called "in_voltage_sampling_frequency" that allows the user to change the frequency on-the-go. I would also like to be able to pass in different modes (a string) through a similar mechanism. How would I do this? It doesn't look like the IIO interface supports ioctl calls.

So in short, what I want is a mechanism to expose a variable called "timer_mode" through IIO, that people could pass a string into that my driver can use.

Marcus Müller
  • 21,602
  • 2
  • 39
  • 54
z470
  • 101

1 Answers1

0

Figured out a solution.

I used the sysfs device attribute stuff as seen here:

https://www.kernel.org/doc/Documentation/driver-model/device.txt

z470
  • 101