docs: Added more detail to iio doc
authorHenry Bruce <henry.bruce@intel.com>
Thu, 3 Dec 2015 23:54:11 +0000 (15:54 -0800)
committerBrendan Le Foll <brendan.le.foll@intel.com>
Tue, 15 Dec 2015 10:42:06 +0000 (10:42 +0000)
Signed-off-by: Henry Bruce <henry.bruce@intel.com>
Signed-off-by: Brendan Le Foll <brendan.le.foll@intel.com>
docs/iio.md

index 6aaa247..243276a 100644 (file)
@@ -1,13 +1,29 @@
 iio                            {#iio}
 ===
-
-IIO is the kernel's framework for supporting sensors. You may need to recompile
-a kernel and add, this is from kernel 4.2:
+IIO is the kernel's framework for supporting sensors. 
+## Using dummy_iio driver
+For platforms without IIO hardware the iio_dummy driver can be used. You can add the driver by either rebuilding the kernel with IIO component enabled or just building the IIO modules and load them.
+You must add the following config fragment. Known to work for kernel 3.19 and later.
+<pre><code>
 CONFIG_IIO_DUMMY_EVGEN=m
 CONFIG_IIO_SIMPLE_DUMMY=m
 CONFIG_IIO_SIMPLE_DUMMY_EVENTS=y
 CONFIG_IIO_SIMPLE_DUMMY_BUFFER=y
-
+</code></pre>
+### Add driver to kernel
+Boot with new kernel, then load modules
+<pre><code>
+$ modprobe iio_dummy
+$ modprobe iio_dummy_evgen
+</code></pre>
+### Load kernel modules
+Depending our your kernel config, some of these modules may already be loaded.
+<pre><code>
+$ insmod drivers/iio/industrialio.ko
+$ insmod drivers/iio/kfifo_buf.ko
+$ insmod drivers/staging/iio/iio_dummy_evgen.ko
+$ insmod drivers/staging/iio/iio_dummy.ko
+</code></pre>
 ## 'RAW' access
 
 Mraa supports raw access
@@ -23,10 +39,4 @@ Mraa supports raw access
 Activate the trigger in /sys/class/iio
 $ echo 1 > trigger0/trigger_now
 
-## Testing without hardware
 
-Create a dummy iio device
-$ modprobe iio_dummy
-
-Create a dummy iio event generator
-$ modprobe iio_dummy_evgen