The conversion from DocBook lead into some conversion issues,
basically due to the lack of proper support at kernel-doc.
So, address them:
- Now, the C files with the exported symbols also need to be
added. So, all headers need to be included twice: one to
get the structs/enums/.. and another one for the functions;
- Notes should use the ReST tag, as kernel-doc doesn't
recognizes it anymore;
- Identation needs to be fixed, as ReST uses it to identify
when a format "tag" ends.
- kernel-doc doesn't escape things like *pointer, so we
need to manually add a escape char before it.
- On some cases, kernel-doc conversion requires violating
the 80-cols, as otherwise it won't properly parse the
source code.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
The kernel-doc script is now broken if it doesn't find all
exported symbols documented.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Just like the uAPI book is split into parts, let's split the
kAPI documentation. That should make easier to maintain, and
will split the final documentation into smaller html files.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Move the contents of the media section at
DocBooks/DocBook/device-drivers.tmpl to a new ReST book.
For now, the contents is kept as-is. Next patches will fix
the warnings and add cross-references that were removed due to
the conversion.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
The rst2pdf tool is a very broken toolchain, with is not capable
of parsing complex documents. As such, it doesn't build the
media book, failing with:
[ERROR] pdfbuilder.py:130 too many values to unpack
(using rst2pdf version 0.93.dev-r0 and Sphinx version 1.4.5)
So, make it build only the books we know that are safe to build.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
--
Btw, with the standard Sphinx version shipped on Fedora 24 (Sphinx
1.3.1), rst2pdf doesn't build even the simple kernel-documentation,
failing with this error:
writing Kernel... [ERROR] pdfbuilder.py:130 list index out of range
This is a known bug:
https://github.com/sphinx-doc/sphinx/issues/1844
So, maybe we should just disable pdf generation from RST for good,
as I suspect that maintaining it with a broken toolchain will be a
big headache.
* 'docs-next' of git://git.lwn.net/linux:
doc-rst: add an option to ignore DocBooks when generating docs
workqueue: Fix a typo in workqueue.txt
Doc: ocfs: Fix typo in filesystems/ocfs2-online-filecheck.txt
Documentation/sphinx: skip build if user requested specific DOCBOOKS
Documentation: add cleanmediadocs to the documentation targets
Those fixes came from patchs from Andrea for the old DocBook
documentation.
As we're removing it on Kernel 4.8, it doesn't make sense to
apply the original patches, but, as the typos were ported
to ReST, let's fix the issues there.
Suggested-by: Andrea Gelmini <andrea.gelmini@gelma.net>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
It is useful to have an index with all the book contents somewhere,
as it makes easier to seek for something. So, increase maxdepth
to 5 for the main index at the beginning of the book.
While here, remove the genindex content, as it is bogus.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Documentation/media/uapi/cec/cec-ioc-dqevent.rst:43: WARNING: undefined label: cec_event_state_change (if the link has no caption the label must precede a section header)
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Lots of fixups relating to references.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Fix those warnings:
Documentation/output/videodev2.h.rst:6: WARNING: undefined label: vidioc_unsubscribe_event (if the link has no caption the label must precede a section header)
Documentation/media/uapi/v4l/dev-overlay.rst:248: WARNING: Title underline too short.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
This patch touches on places where it shouldn't: image
files and code examples. Also, it doesn't fix all array
occurrences.
So, let's revert it.
This reverts commit ffbab694ed.
The timestamp field was split into rx_ts and tx_ts, and the rx/tx_status
fields were moved. Update the doc accordingly.
Also fix a bug that stated that a non-zero tx_status field signaled an
error. That's not true, since TX_STATUS_OK is 1, not 0.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Those characters are used for citations. Better to escape, to
avoid them to be misinterpreted.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
According with ReST spec, footnotes should be like:
[#name], and not [name]. So, change them.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Fix missing documentation, and its cross reference.
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Fix it by adding a header to the flat-table to match to
the list of define symbols.
As a side-effect, it also removes some exceptions from
videodev2.h.rst.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Reorganize the LIRC rst files, using "-" instead of "_" on
their names, and creating a separate chapter for syscalls.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Add LIRC_SET_[REC|SEND]_MODE ioctls to the corresponding
GET functions, and put all LIRC modes altogether.
As now everything is already documented on its own ioctl
pages, get rid of lirc_ioctl.rst.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Add proper documentation for this ioctl, providing some
additional information about its usage.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Put each ioctl on its own page and improve documentation, adding
cross-references for LIRC_SET_REC_CARRIER_RANGE and LIRC_SET_REC_CARRIER,
with can be used together to set a carrier frequency range.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Improve the documentation for those ioctls, adding them to
a separate file, in order to look like the rest of the
book, and to later allow to generate a man page for those
ioctls.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Improve the documentation for this ioctl, adding it to
a separate file, in order to look like the rest of the
book, and to later allow to generate a man page for this
ioctl.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Move the documentation of this ioctl from lirc_ioctl to its
own file, and add a short description about the pulse mode
used by IR RX.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Some references were broken. It was also mentioning LIRC_MODE_RAW,
with it is not implemented on current LIRC drivers.
So, fix the references.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Move the documentation of this ioctl from lirc_ioctl to its
own file, and add a short description about the pulse mode
used by IR TX.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
As we removed those ioctls from the header file, do the
same at the documentation side.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
While reviewing the documentation gaps on LIRC, it was
noticed that several ioctls aren't used by any LIRC drivers
(nor at staging or mainstream).
It doesn't make sense to document them, as they're not used
anywhere. So, let's remove those from the lirc header.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
changeset 68cd5e0bed ("[media] doc-rst: add LIRC header to the book")
did everything but adding the lirc-reader.rst :-p
My fault: I forgot to do a git add for this guy on such
changeset.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
The documentation for this ioctl was really crappy.
Add a better documentation, using the lirc.4 man pages as a
reference, plus what was written originally at the lirc-ioctl.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
There are several notes and warning mesages in the middle of
the media docbook. Use the ReST tags for that, as it makes
them visually better and hightlights them.
While here, modify a few ones to make them clearer.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
There are several notes for this DTV property. Some are
outdated, so take some care of it, making it updated.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Unfortunately, captions are new on Sphinx for c blocks: it was
added only on version 1.3. Also, it were already bad enough
not being able to auto-numerate them.
So, let's give up and use, instead, titles before the examples.
Not much is lost, and, as a side track, we don't need to
numerate them anymore.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Now that the LIRC header was added, we can cross-reference it
and identify the documentation gaps.
There are lots of stuff missing there, but at least now we
can avoid the gap to increase.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Just like the other parts of the document, let's add the LIRC
header, as it is part of the API.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
The lirc syscall documentation uses a very different and
simplified way than the rest of the media book. make it
closer. Still, there's just one page for all ioctls.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Some files start with an upper letter. Also, they have big
names. rename them.
No functional changes.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
There's no need to say: Table of Contents there. Also, this
generates a duplicated caption xref. So, remove, to use the
same format on every part.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Just like the other parts of the media book, group the MC
functions together on one chapter.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Sometimes, we want to do a partial build, instead of building
everything. However, right now, if one wants to build just
Sphinx books, it will build also the DocBooks.
Add an option to allow to ignore all DocBooks when building
documentation.
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Signed-off-by: Jonathan Corbet <corbet@lwn.net>