Commit graph

37 commits

Author SHA1 Message Date
Mauro Carvalho Chehab
7b998bae05 [media] doc-rst: kapi: use :c:func: instead of :cpp:func
References at the rst files for C functions generated via
kernel-doc should use :c:func:.

Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:04:21 -03:00
Mauro Carvalho Chehab
c91661f1e6 [media] v4l2-ioctl.h add debug info for struct v4l2_ioctl_ops
This struct is mentioned at the kAPI docbook. So, let's document
it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:04:21 -03:00
Mauro Carvalho Chehab
f6fa883bb7 [media] doc-rst: reorganize the kAPI v4l2 chapters
Reorganize the order of the document, putting the chapters
on a more logical order and renaming some sections.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:04:21 -03:00
Mauro Carvalho Chehab
f4a6bdd1f3 [media] rename v4l2-framework.rst to v4l2-intro.rst
Now that the only remaining chapters at v4l2-framework are
the introduction ones, let' s rename the file.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:04:21 -03:00
Mauro Carvalho Chehab
b67b81d750 [media] move V4L2 clocks to a separate .rst file
Move the v4l2 clocks stuff from v4l2-framework to a separate
file and adds an attention that came from the v4l2-clk.h.

Note: as this is meant to be a temporary kAPI, and it is
used only by two drivers (soc_camera and em28xx), where
the first one is in deprecation process, it probably not
a worth effort to document its header.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:04:21 -03:00
Mauro Carvalho Chehab
46f74f1d3e [media] v4l2-fh.rst: add cross references and markups
Add cross-references with the kernel-doc functions/structs
and improve the markups.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:04:21 -03:00
Mauro Carvalho Chehab
378d4a54ae [media] v4l2-fh.rst: add fh contents from v4l2-framework.rst
Move the v4l2_fh specific content from v4l2-framework.rst
to v4l2-fh.rst.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:04:21 -03:00
Mauro Carvalho Chehab
4ada120eaa [media] v4l2-fh.h: add documentation for it
This header file was undocumented. Add documentation for it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:04:21 -03:00
Mauro Carvalho Chehab
d231685682 [media] v4l2-event.rst: add cross-references and markups
Improve events documentation by adding cross references,
sub-titles and other markup elements.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:04:21 -03:00
Mauro Carvalho Chehab
8f511fc4a3 [media] v4l2-event.rst: add text from v4l2-framework.rst
Move the v4l2 event-specific text from v4l2-framework.rst
to v4l2-event.rst. That helps to keep the text together with
the functions it describes, and makes easier to identify
documentation gaps.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:04:21 -03:00
Mauro Carvalho Chehab
5feecc62df [media] v4l2-framework.rst: remove videobuf quick chapter
As we merged the videobuf chapter at the kABI section, and it
is a way more complete, just remove the small videobuf chapter
that came from framework.txt.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:04:21 -03:00
Mauro Carvalho Chehab
243b6935ae [media] v4l2-dev: add cross-references and improve markup
Add cross-references for the functions/structs and add
the markup tags to improve its display.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:04:21 -03:00
Mauro Carvalho Chehab
81d866fdcd [media] doc-rst: move v4l2-dev doc to a separate file
Move the documentation for video device node creation to
a separate file.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:04:21 -03:00
Mauro Carvalho Chehab
d9d3d1761a [media] doc-rst: document v4l2-dev.h
Add documentation for v4l2-dev.h, and put it at v4l2-framework.rst,
where struct video_device is currently documented.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:04:21 -03:00
Mauro Carvalho Chehab
041d8211a0 [media] mc-core: Fix a cross-reference
The v4l2_subdev reference was using the wrong tag. Fix it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:04:21 -03:00
Mauro Carvalho Chehab
a39c57f8cd [media] v4l2-common.h: document the subdev functions
There are some subdev-specific functions at v4l2-common.h
that are mentioned at v4l2-subdev.rst.

Document them.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:04:21 -03:00
Mauro Carvalho Chehab
55aeed72ea [media] v4l2-subdev.rst: add cross references to new sections
The two new sections were missing cross-references, and had
some other minor issues with the markups. Add such things.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:04:21 -03:00
Mauro Carvalho Chehab
2873f4db2a [media] v4l2-subdev.rst: add two sections from v4l2-framework.rst
There are two additional subdev-specific sections at the
v4l2-framework file. Move them to the subdev chapter, in order
to better organize the book.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:04:21 -03:00
Mauro Carvalho Chehab
1bbcdae7f0 [media] doc-rst: merge v4l2-async.rst with v4l2-subdev.rst
The Async API is actually part of the v4l2 subdev.
Move its declarations to it.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:04:21 -03:00
Mauro Carvalho Chehab
b7fd663002 [media] v4l2-subdev.rst: add cross-references
Enrich the subdevice description by linking it to the
functions and structs from v4l2-subdev.h.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:04:21 -03:00
Mauro Carvalho Chehab
840b14d983 [media] v4l2-subdev.rst: add documentation from v4l2-framework.rst
There are lots of documentation about V4L2 subdevices at
v4l2-framework.rst. Move them to its specific chapter at
v4l2-subdev.rst.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:03:24 -03:00
Mauro Carvalho Chehab
02ca08b8ae [media] v4l2-device.rst: do cross references with kernel-doc
This document describes the main kAPI interfaces for the
v4l2-device.h header. Add cross references to the documentation
produced via kernel-doc.

While here, also use monotonic font for constants.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:03:24 -03:00
Mauro Carvalho Chehab
5de379a2ff [media] v4l2-device.rst: add contents from v4l2-framework
Part of the contents of v4l2-framework is related to the
kAPI defined by v4l2-device. Move such contents to the
v4l2-device.rst.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:03:24 -03:00
Mauro Carvalho Chehab
5875987400 [media] doc-rst: Split v4l-core into one file per kAPI
Sphinx produce a 1:1 mapping between a rst file and an html file.

So, we need to split the kernel-doc tags on multiple documents.

A side effect is that we're now having a better name for each
section of the kAPI documentation.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:03:24 -03:00
Mauro Carvalho Chehab
575f93084d [media] v4l2-device.h: document functions
The functions at v4l2-device.h are not using the proper
markups. Add it, and include at the v4l2-core.rst.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:03:24 -03:00
Mauro Carvalho Chehab
da83c888bf [media] doc-rst: better organize the media books
The uAPI book has 5 parts, but they lost numeration after
conversion to rst. Manually number those parts, and make
the main index with 1 depth, to only show the parts and
the annexes.

At each part, use :maxwidth: 5, in order to show a more
complete index.

While here, fix the cross-references between different
books.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 08:03:24 -03:00
Mauro Carvalho Chehab
c278256d05 Merge branch 'patchwork' into topic/docs-next
* patchwork: (1492 commits)
  [media] cec: always check all_device_types and features
  [media] cec: poll should check if there is room in the tx queue
  [media] vivid: support monitor all mode
  [media] cec: fix test for unconfigured adapter in main message loop
  [media] cec: limit the size of the transmit queue
  [media] cec: zero unused msg part after msg->len
  [media] cec: don't set fh to NULL in CEC_TRANSMIT
  [media] cec: clear all status fields before transmit and always fill in sequence
  [media] cec: CEC_RECEIVE overwrote the timeout field
  [media] cxd2841er: Reading SNR for DVB-C added
  [media] cxd2841er: Reading BER and UCB for DVB-C added
  [media] cxd2841er: fix switch-case for DVB-C
  [media] cxd2841er: fix signal strength scale for ISDB-T
  [media] cxd2841er: adjust the dB scale for DVB-C
  [media] cxd2841er: provide signal strength for DVB-C
  [media] cxd2841er: fix BER report via DVBv5 stats API
  [media] mb86a20s: apply mask to val after checking for read failure
  [media] airspy: fix error logic during device register
  [media] s5p-cec/TODO: add TODO item
  [media] cec/TODO: drop comment about sphinx documentation
  ...

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-23 07:59:19 -03:00
Mauro Carvalho Chehab
cf022874b6 [media] doc-rst: fix media kAPI documentation
I ended by adding twice each media header, because I saw some
missing stuff at the documents. It seems it was my mistake,
as everything seems to be there.

So, remove those extra stuff, to avoid duplicating the
documentation of the functions.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-18 14:46:07 -03:00
Mauro Carvalho Chehab
1bed13f521 [media] doc-rst: Convert videobuf documentation to ReST
The videobuf documentation is almost at rst format: we
just needed to add titles and add some code-blocks there
and that's it.

Also, add a notice that this framework is deprecated.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-17 16:30:36 -03:00
Mauro Carvalho Chehab
9488fed623 [media] doc-rst: move videobuf documentation to media/kapi
This document describes a kapi framework. Move it to the right
place.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-17 16:30:36 -03:00
Mauro Carvalho Chehab
4c21d4fb1b [media] doc-rst: do a poor man's conversion of v4l2-framework
Make Sphinx happy with v4l2-framework.rst by putting all C
code inside code-block.

Please note that this is a poor man ReST conversion, as several
of those blocks should actually be converted to use :cpp:func:,
pointing to the kAPI auto-generated documentation.

The problem is that we currently lack kernel-doc documentation
for most of the stuff described there.

So, let's do a poor man's conversion. We should later address
this.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-17 16:30:35 -03:00
Mauro Carvalho Chehab
f6ebc2d341 [media] doc-rst: move framework docs to kAPI documentation
Those documentation are part of the kAPI one. Move to the right
place.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-17 16:30:35 -03:00
Mauro Carvalho Chehab
d2f019851a [media] doc-rst: Fix conversion for dvb-core.rst
The conversion from DocBook required some fixes:

- 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.

- Fix the cross-references at the media controller description.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-17 14:02:45 -03:00
Mauro Carvalho Chehab
74604b7390 [media] doc-rst: Fix conversion for MC core functions
There were lots of issues at the media controller side,
after the conversion:

- Some documentation at the header files weren't using the
  kernel-doc start block;

- 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.

- Fix the cross-references at the media controller description.

Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
2016-07-17 14:02:44 -03:00
Mauro Carvalho Chehab
89cb3ddbe7 [media] doc-rst: Fix conversion for v4l2 core functions
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>
2016-07-17 14:02:43 -03:00
Mauro Carvalho Chehab
5b6137dc84 [media] doc-rst: Fix issues with RC documentation
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>
2016-07-17 14:02:43 -03:00
Mauro Carvalho Chehab
684ffa2d55 [media] doc-rst: split media_drivers.rst into one file per API type
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>
2016-07-17 14:02:42 -03:00