aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/kernel-documentation.rst
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-10-04 16:54:07 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2016-10-04 16:54:07 -0400
commit02bafd96f3a5d8e610b19033ffec55b92459aaae (patch)
tree6f59becfaaaa724077f3855328e5825b896a68e7 /Documentation/kernel-documentation.rst
parent2105b9ff733c5e5ab3e0481f1c953ac3f7d7c44a (diff)
parent3c76ff4765fbd382c095acc37f87e136a8dfc73d (diff)
Merge tag 'docs-4.9' of git://git.lwn.net/linux
Pull documentation updates from Jonathan Corbet: "This is the documentation update pull for the 4.9 merge window. The Sphinx transition is still creating a fair amount of work. Here we have a number of fixes and, importantly, a proper PDF output solution, thanks to Jani Nikula, Mauro Carvalho Chehab and Markus Heiser. I've started a couple of new books: a driver API book (based on the old device-drivers.tmpl) and a development tools book. Both are meant to show how we can integrate together our existing documentation into a more coherent and accessible whole. It involves moving some stuff around and formatting changes, but, I think, the results are worth it. The good news is that most of our existing Documentation/*.txt files are *almost* in RST format already; the amount of messing around required is minimal. And, of course, there's the usual set of updates, typo fixes, and more" * tag 'docs-4.9' of git://git.lwn.net/linux: (120 commits) URL changed for Linux Foundation TAB dax : Fix documentation with respect to struct pages iio: Documentation: Correct the path used to create triggers. docs: Remove space-before-label guidance from CodingStyle docs-rst: add inter-document cross references Documentation/email-clients.txt: convert it to ReST markup Documentation/kernel-docs.txt: reorder based on timestamp Documentation/kernel-docs.txt: Add dates for online docs Documentation/kernel-docs.txt: get rid of broken docs Documentation/kernel-docs.txt: move in-kernel docs Documentation/kernel-docs.txt: remove more legacy references Documentation/kernel-docs.txt: add two published books Documentation/kernel-docs.txt: sort books per publication date Documentation/kernel-docs.txt: adjust LDD references Documentation/kernel-docs.txt: some improvements on the ReST output Documentation/kernel-docs.txt: Consistent indenting: 4 spaces Documentation/kernel-docs.txt: Add 4 paper/book references Documentation/kernel-docs.txt: Improve layouting of book list Documentation/kernel-docs.txt: Remove offline or outdated entries docs: Clean up bare :: lines ...
Diffstat (limited to 'Documentation/kernel-documentation.rst')
-rw-r--r--Documentation/kernel-documentation.rst31
1 files changed, 31 insertions, 0 deletions
diff --git a/Documentation/kernel-documentation.rst b/Documentation/kernel-documentation.rst
index 391decc66a18..10cc7ddb6235 100644
--- a/Documentation/kernel-documentation.rst
+++ b/Documentation/kernel-documentation.rst
@@ -107,6 +107,35 @@ Here are some specific guidelines for the kernel documentation:
107 the order as encountered."), having the higher levels the same overall makes 107 the order as encountered."), having the higher levels the same overall makes
108 it easier to follow the documents. 108 it easier to follow the documents.
109 109
110
111the C domain
112------------
113
114The `Sphinx C Domain`_ (name c) is suited for documentation of C API. E.g. a
115function prototype:
116
117.. code-block:: rst
118
119 .. c:function:: int ioctl( int fd, int request )
120
121The C domain of the kernel-doc has some additional features. E.g. you can
122*rename* the reference name of a function with a common name like ``open`` or
123``ioctl``:
124
125.. code-block:: rst
126
127 .. c:function:: int ioctl( int fd, int request )
128 :name: VIDIOC_LOG_STATUS
129
130The func-name (e.g. ioctl) remains in the output but the ref-name changed from
131``ioctl`` to ``VIDIOC_LOG_STATUS``. The index entry for this function is also
132changed to ``VIDIOC_LOG_STATUS`` and the function can now referenced by:
133
134.. code-block:: rst
135
136 :c:func:`VIDIOC_LOG_STATUS`
137
138
110list tables 139list tables
111----------- 140-----------
112 141
@@ -265,6 +294,8 @@ The kernel-doc extension is included in the kernel source tree, at
265``scripts/kernel-doc`` script to extract the documentation comments from the 294``scripts/kernel-doc`` script to extract the documentation comments from the
266source. 295source.
267 296
297.. _kernel_doc:
298
268Writing kernel-doc comments 299Writing kernel-doc comments
269=========================== 300===========================
270 301