summaryrefslogtreecommitdiff
path: root/Documentation/kernel-documentation.rst
diff options
context:
space:
mode:
authorDmitry Torokhov <dmitry.torokhov@gmail.com>2016-12-16 08:36:09 +0300
committerDmitry Torokhov <dmitry.torokhov@gmail.com>2016-12-16 08:36:09 +0300
commitebfb0184ef560897fad35005989e82433419202c (patch)
tree226a8195fdae6c79d90d76baa1cbdaf80f794bb0 /Documentation/kernel-documentation.rst
parentf43d3ec3a889c7f6a196f3b6d6b13345ee46af8a (diff)
parent5191d88acc688743eef56f1c598a4e4cddf6c6cd (diff)
downloadlinux-ebfb0184ef560897fad35005989e82433419202c.tar.xz
Merge branch 'synaptics-rmi4' into next
Merge updated Synaptics RMI4 support, including support for SMBus controllers and flashing firmware.
Diffstat (limited to 'Documentation/kernel-documentation.rst')
-rw-r--r--Documentation/kernel-documentation.rst29
1 files changed, 29 insertions, 0 deletions
diff --git a/Documentation/kernel-documentation.rst b/Documentation/kernel-documentation.rst
index 391decc66a18..a0dcae15639b 100644
--- a/Documentation/kernel-documentation.rst
+++ b/Documentation/kernel-documentation.rst
@@ -107,6 +107,35 @@ Here are some specific guidelines for the kernel documentation:
the order as encountered."), having the higher levels the same overall makes
it easier to follow the documents.
+
+the C domain
+------------
+
+The `Sphinx C Domain`_ (name c) is suited for documentation of C API. E.g. a
+function prototype:
+
+.. code-block:: rst
+
+ .. c:function:: int ioctl( int fd, int request )
+
+The C domain of the kernel-doc has some additional features. E.g. you can
+*rename* the reference name of a function with a common name like ``open`` or
+``ioctl``:
+
+.. code-block:: rst
+
+ .. c:function:: int ioctl( int fd, int request )
+ :name: VIDIOC_LOG_STATUS
+
+The func-name (e.g. ioctl) remains in the output but the ref-name changed from
+``ioctl`` to ``VIDIOC_LOG_STATUS``. The index entry for this function is also
+changed to ``VIDIOC_LOG_STATUS`` and the function can now referenced by:
+
+.. code-block:: rst
+
+ :c:func:`VIDIOC_LOG_STATUS`
+
+
list tables
-----------