Skip to content

Commit 1c349f4

Browse files
mchehabjic23
authored andcommitted
docs: iio: convert to ReST
Rename the iio documentation files to ReST, add an index for them and adjust in order to produce a nice html output via the Sphinx build system. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Jonathan Cameron <[email protected]>
1 parent 7685010 commit 1c349f4

File tree

4 files changed

+56
-25
lines changed

4 files changed

+56
-25
lines changed

Documentation/iio/ep93xx_adc.txt renamed to Documentation/iio/ep93xx_adc.rst

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,16 @@
1-
Cirrus Logic EP93xx ADC driver.
1+
==============================
2+
Cirrus Logic EP93xx ADC driver
3+
==============================
24

35
1. Overview
6+
===========
47

58
The driver is intended to work on both low-end (EP9301, EP9302) devices with
69
5-channel ADC and high-end (EP9307, EP9312, EP9315) devices with 10-channel
710
touchscreen/ADC module.
811

912
2. Channel numbering
13+
====================
1014

1115
Numbering scheme for channels 0..4 is defined in EP9301 and EP9302 datasheets.
1216
EP9307, EP9312 and EP9312 have 3 channels more (total 8), but the numbering is
@@ -17,13 +21,20 @@ Assuming ep93xx_adc is IIO device0, you'd find the following entries under
1721

1822
+-----------------+---------------+
1923
| sysfs entry | ball/pin name |
20-
+-----------------+---------------+
24+
+=================+===============+
2125
| in_voltage0_raw | YM |
26+
+-----------------+---------------+
2227
| in_voltage1_raw | SXP |
28+
+-----------------+---------------+
2329
| in_voltage2_raw | SXM |
30+
+-----------------+---------------+
2431
| in_voltage3_raw | SYP |
32+
+-----------------+---------------+
2533
| in_voltage4_raw | SYM |
34+
+-----------------+---------------+
2635
| in_voltage5_raw | XP |
36+
+-----------------+---------------+
2737
| in_voltage6_raw | XM |
38+
+-----------------+---------------+
2839
| in_voltage7_raw | YP |
2940
+-----------------+---------------+
Lines changed: 30 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
1+
===============================
12
Industrial IIO configfs support
3+
===============================
24

35
1. Overview
6+
===========
47

58
Configfs is a filesystem-based manager of kernel objects. IIO uses some
69
objects that could be easily configured using configfs (e.g.: devices,
@@ -10,61 +13,63 @@ See Documentation/filesystems/configfs/configfs.txt for more information
1013
about how configfs works.
1114

1215
2. Usage
16+
========
1317

1418
In order to use configfs support in IIO we need to select it at compile
1519
time via CONFIG_IIO_CONFIGFS config option.
1620

17-
Then, mount the configfs filesystem (usually under /config directory):
21+
Then, mount the configfs filesystem (usually under /config directory)::
1822

19-
$ mkdir /config
20-
$ mount -t configfs none /config
23+
$ mkdir /config
24+
$ mount -t configfs none /config
2125

2226
At this point, all default IIO groups will be created and can be accessed
2327
under /config/iio. Next chapters will describe available IIO configuration
2428
objects.
2529

2630
3. Software triggers
31+
====================
2732

2833
One of the IIO default configfs groups is the "triggers" group. It is
2934
automagically accessible when the configfs is mounted and can be found
3035
under /config/iio/triggers.
3136

3237
IIO software triggers implementation offers support for creating multiple
3338
trigger types. A new trigger type is usually implemented as a separate
34-
kernel module following the interface in include/linux/iio/sw_trigger.h:
39+
kernel module following the interface in include/linux/iio/sw_trigger.h::
3540

36-
/*
37-
* drivers/iio/trigger/iio-trig-sample.c
38-
* sample kernel module implementing a new trigger type
39-
*/
40-
#include <linux/iio/sw_trigger.h>
41+
/*
42+
* drivers/iio/trigger/iio-trig-sample.c
43+
* sample kernel module implementing a new trigger type
44+
*/
45+
#include <linux/iio/sw_trigger.h>
4146

4247

43-
static struct iio_sw_trigger *iio_trig_sample_probe(const char *name)
44-
{
48+
static struct iio_sw_trigger *iio_trig_sample_probe(const char *name)
49+
{
4550
/*
4651
* This allocates and registers an IIO trigger plus other
4752
* trigger type specific initialization.
4853
*/
49-
}
54+
}
5055

51-
static int iio_trig_hrtimer_remove(struct iio_sw_trigger *swt)
52-
{
56+
static int iio_trig_hrtimer_remove(struct iio_sw_trigger *swt)
57+
{
5358
/*
5459
* This undoes the actions in iio_trig_sample_probe
5560
*/
56-
}
61+
}
5762

58-
static const struct iio_sw_trigger_ops iio_trig_sample_ops = {
63+
static const struct iio_sw_trigger_ops iio_trig_sample_ops = {
5964
.probe = iio_trig_sample_probe,
6065
.remove = iio_trig_sample_remove,
61-
};
66+
};
6267

63-
static struct iio_sw_trigger_type iio_trig_sample = {
68+
static struct iio_sw_trigger_type iio_trig_sample = {
6469
.name = "trig-sample",
6570
.owner = THIS_MODULE,
6671
.ops = &iio_trig_sample_ops,
67-
};
72+
};
6873

6974
module_iio_sw_trigger_driver(iio_trig_sample);
7075

@@ -73,21 +78,24 @@ iio-trig-sample module will create 'trig-sample' trigger type directory
7378
/config/iio/triggers/trig-sample.
7479

7580
We support the following interrupt sources (trigger types):
81+
7682
* hrtimer, uses high resolution timers as interrupt source
7783

7884
3.1 Hrtimer triggers creation and destruction
85+
---------------------------------------------
7986

8087
Loading iio-trig-hrtimer module will register hrtimer trigger types allowing
8188
users to create hrtimer triggers under /config/iio/triggers/hrtimer.
8289

83-
e.g:
90+
e.g::
8491

85-
$ mkdir /config/iio/triggers/hrtimer/instance1
86-
$ rmdir /config/iio/triggers/hrtimer/instance1
92+
$ mkdir /config/iio/triggers/hrtimer/instance1
93+
$ rmdir /config/iio/triggers/hrtimer/instance1
8794

8895
Each trigger can have one or more attributes specific to the trigger type.
8996

9097
3.2 "hrtimer" trigger types attributes
98+
--------------------------------------
9199

92100
"hrtimer" trigger type doesn't have any configurable attribute from /config dir.
93101
It does introduce the sampling_frequency attribute to trigger directory.

Documentation/iio/index.rst

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
:orphan:
2+
3+
==============
4+
Industrial I/O
5+
==============
6+
7+
.. toctree::
8+
:maxdepth: 1
9+
10+
iio_configfs
11+
12+
ep93xx_adc

drivers/iio/Kconfig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ config IIO_CONFIGFS
2727
help
2828
This allows configuring various IIO bits through configfs
2929
(e.g. software triggers). For more info see
30-
Documentation/iio/iio_configfs.txt.
30+
Documentation/iio/iio_configfs.rst.
3131

3232
config IIO_TRIGGER
3333
bool "Enable triggered sampling support"

0 commit comments

Comments
 (0)