Skip to content
  1. Sep 16, 2016
  2. Sep 06, 2016
  3. Sep 01, 2016
    • Markus Heiser's avatar
      doc-rst: define PDF's of the media folder · 95149971
      Markus Heiser authored
      
      
      To build only the PDF of the media folder run::
      
        make SPHINXDIRS=media pdfdocs
      
      Signed-off-by: default avatarMarkus Heiser <markus.heiser@darmarIT.de>
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      95149971
    • Markus Heiser's avatar
      doc-rst: generic way to build PDF of sub-folders · cd21379b
      Markus Heiser authored
      
      
      This extends the method to build only sub-folders to the targets
      "latexdocs" and "pdfdocs". To do so, a conf.py in the sub-folder is
      required, where the latex_documents of the sub-folder are
      defined. E.g. to build only gpu's PDF add the following to the
      Documentation/gpu/conf.py::
      
        +latex_documents = [
        +    ("index", "gpu.tex", "Linux GPU Driver Developer's Guide",
        +     "The kernel development community", "manual"),
        +]
      
      and run:
      
        make SPHINXDIRS=gpu pdfdocs
      
      Signed-off-by: default avatarMarkus Heiser <markus.heiser@darmarIT.de>
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      cd21379b
    • Markus Heiser's avatar
      docs: sphinx-extensions: add metadata parallel-safe · b62b9d81
      Markus Heiser authored
      
      
      The setup() function of a Sphinx-extension can return a dictionary. This
      is treated by Sphinx as metadata of the extension [1].
      
      With metadata "parallel_read_safe = True" a extension is marked as
      save for "parallel reading of source". This is needed if you want
      build in parallel with N processes. E.g.:
      
        make SPHINXOPTS=-j4 htmldocs
      
      will no longer log warnings like:
      
        WARNING: the foobar extension does not declare if it is safe for
        parallel reading, assuming it isn't - please ask the extension author
        to check and make it explicit.
      
      Add metadata to extensions:
      
      * kernel-doc
      * flat-table
      * kernel-include
      
      [1] http://www.sphinx-doc.org/en/stable/extdev/#extension-metadata
      
      Signed-off-by: default avatarMarkus Heiser <markus.heiser@darmarIT.de>
      Tested-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      b62b9d81
    • Mauro Carvalho Chehab's avatar
      docs-rst: kernel-doc: fix typedef output in RST format · 82801d06
      Mauro Carvalho Chehab authored
      
      
      When using a typedef function like this one:
      	typedef bool v4l2_check_dv_timings_fnc (const struct v4l2_dv_timings * t, void * handle);
      
      The Sphinx C domain expects it to create a c:type: reference,
      as that's the way it creates the type references when parsing
      a c:function:: declaration.
      
      So, a declaration like:
      
      	.. c:function:: bool v4l2_valid_dv_timings (const struct v4l2_dv_timings * t, const struct v4l2_dv_timings_cap * cap, v4l2_check_dv_timings_fnc fnc, void * fnc_handle)
      
      Will create a cross reference for :c:type:`v4l2_check_dv_timings_fnc`.
      
      So, when outputting such typedefs in RST format, we need to handle
      this special case, as otherwise it will produce those warnings:
      
      	./include/media/v4l2-dv-timings.h:43: WARNING: c:type reference target not found: v4l2_check_dv_timings_fnc
      	./include/media/v4l2-dv-timings.h:60: WARNING: c:type reference target not found: v4l2_check_dv_timings_fnc
      	./include/media/v4l2-dv-timings.h:81: WARNING: c:type reference target not found: v4l2_check_dv_timings_fnc
      
      So, change the kernel-doc script to produce a RST output for the
      above typedef as:
      	.. c:type:: v4l2_check_dv_timings_fnc
      
      	   **Typedef**: timings check callback
      
      	**Syntax**
      
      	  ``bool v4l2_check_dv_timings_fnc (const struct v4l2_dv_timings * t, void * handle);``
      
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      82801d06
    • Mauro Carvalho Chehab's avatar
      docs-rst: improve typedef parser · d37c43ce
      Mauro Carvalho Chehab authored
      
      
      Improve the parser to handle typedefs like:
      
      	typedef bool v4l2_check_dv_timings_fnc(const struct v4l2_dv_timings *t, void *handle);
      
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      d37c43ce
  4. Aug 26, 2016
  5. Aug 25, 2016
    • Mauro Carvalho Chehab's avatar
      docs-rst: kernel-doc: better output struct members · 6d232c80
      Mauro Carvalho Chehab authored
      
      
      Right now, for a struct, kernel-doc produces the following output:
      
      	.. c:type:: struct v4l2_prio_state
      
      	   stores the priority states
      
      	**Definition**
      
      	::
      
      	  struct v4l2_prio_state {
      	    atomic_t prios[4];
      	  };
      
      	**Members**
      
      	``atomic_t prios[4]``
      	  array with elements to store the array priorities
      
      Putting a member name in verbatim and adding a continuation line
      causes the LaTeX output to generate something like:
      	item[atomic_t prios\[4\]] array with elements to store the array priorities
      
      Everything inside "item" is non-breakable, with may produce
      lines bigger than the column width.
      
      Also, for function members, like:
      
              int (* rx_read) (struct v4l2_subdev *sd, u8 *buf, size_t count,ssize_t *num);
      
      It puts the name of the member at the end, like:
      
              int (*) (struct v4l2_subdev *sd, u8 *buf, size_t count,ssize_t *num) read
      
      With is very confusing.
      
      The best is to highlight what really matters: the member name.
      is a secondary information.
      
      So, change kernel-doc, for it to produce the output on a different way:
      
      	**Members**
      
      	``prios[4]``
      
      	  array with elements to store the array priorities
      
      Also, as the type is not part of LaTeX "item[]", LaTeX will split it into
      multiple lines, if needed.
      
      So, both LaTeX/PDF and HTML outputs will look good.
      
      It should be noticed, however, that the way Sphinx LaTeX output handles
      things like:
      
      	Foo
      	   bar
      
      is different than the HTML output. On HTML, it will produce something
      like:
      
      	**Foo**
      	   bar
      
      While, on LaTeX, it puts both foo and bar at the same line, like:
      
      	**Foo** bar
      
      Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
      Signed-off-by: default avatarJonathan Corbet <corbet@lwn.net>
      6d232c80
  6. Aug 23, 2016
  7. Aug 20, 2016
  8. Aug 19, 2016