Commit graph

5 commits

Author SHA1 Message Date
Gerard Marull-Paretas
3282cf8ef2 doc: move scripts to _scripts
Move Sphinx related content to folders with underscore prefix.

Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
2021-03-31 10:39:48 +02:00
Martí Bolívar
e4c0783bfd doc: add new :dtcompatible: role / directive
This allows RST documentation to do something like this:

   See :dtcompatible:`vnd,foo` for more information.

This is transformed into a link to documentation for the "vnd,foo"
compatible.

Some devicetree compatibles may be handled by multiple bindings.
This can happen when the binding file is bus-dependent. Therefore, to
make this work, we need to change the way gen_devicetree_rest.py works
to ensure we have a good source of information for this compatible
regardless of how many bindings are associated with as follows:

- When only a single binding is associated with a compatible, the
  :dtcompatible: link goes directly to the per-binding HTML page.

- When multiple bindings are associated with a compatible, this goes
  to a new generated "disambiguation" page which links to all the
  per-binding pages.

To avoid clashes, we stick the disambiguation pages into a
compatibles/ subdirectory of the generated bindings index root
directory.

Also reorganize the generated bindings output directory into
.../bindings/subdir/binding.rst files. For example,
dts/bindings/arm/arm,dtcm.yaml now gets its generated content in
.../bindings/arm/arm,dtcm.rst.

This brings the 'category' of binding (like 'sensor', 'i2c', etc.)
into the URL, which is a useful hint.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-03-29 16:33:51 +02:00
Martí Bolívar
1d439efbb3 doc: make it clear when DT properties are deprecated
Devicetree properties may be deprecated. Make deprecated properties
more prominent in the generated bindings documentation as follows:

  1. For deprecated node-specific properties, make a new tab which
     only contains the deprecated properties

  2. For deprecated child-binding properties, ensure a line
     mentioning derpecation is in the property details

  3. For deprecated 'base' binding properties, do the same thing as
     child-bindings. Note that there aren't any such properties,
     but they'd fall in this bucket if we add any later on.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2021-02-04 13:11:01 -05:00
Carles Cufi
0d02de6113 doc: script: Default to empty string in DT docset env var
Windows does not default to an empty string when an env var is not
declared, like Linux does. Instead, explicitly default to one in order
for the .strip() call to work properly.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
2020-12-01 14:55:19 -05:00
Martí Bolívar
808dd9e684 doc: reference: add devicetree bindings content
Add generated documentation content for known devicetree bindings
using the Binding abstraction which was just added to edtlib. This
works similarly to the way Kconfig content is generated, so extract a
bit of common helper code for doing that out and rename the relevant
files to keep the distinction clear.

Make the documentation build system respect a preset DTS_ROOT. In this
way, out of tree bindings can be added to the generated content by
telling the documentation build system where to find them, identically
to how out of tree bindings can be added to a Zephyr application.

Similarly, make the output directory configurable.

Fixes: #28865
Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-11-02 14:26:33 -05:00