From d3bdb67cd718d697da76da596c799f3009cb1877 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Thu, 9 Jan 2020 05:24:52 +0100 Subject: [PATCH] doc: dts: Use definition list for compatible/label/ref See https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html. Gives neater output compared to a bullet list. Also tweak the text a bit. Signed-off-by: Ulf Magnusson --- doc/guides/dts/index.rst | 43 ++++++++++++++++++++++------------------ 1 file changed, 24 insertions(+), 19 deletions(-) diff --git a/doc/guides/dts/index.rst b/doc/guides/dts/index.rst index a9e6d1ee9db..55ad5185365 100644 --- a/doc/guides/dts/index.rst +++ b/doc/guides/dts/index.rst @@ -129,25 +129,30 @@ a gray background, except for the root node, which is shown using its path Some important properties are: -- **compatible**: this says what "kind" of device the node represents. Its - value is a null-terminated string in the format "vendor,device", like - ``"avago,apds9960"``, or a sequence of these, like ``"ti,hdc", - "ti,hdc1010"``. The build system uses the compatible property to find the - right bindings for the node. -- **label**: the device's name according to Zephyr's :ref:`device_drivers`. The - value can be passed to :c:func:`device_get_binding()` to retrieve the - corresponding driver-level :ref:`struct device* `. This - pointer can then be passed to the correct driver API by application code to - interact with the device. For example, calling - ``device_get_binding("I2C_0")`` would return a pointer to a device - structure which could be passed to :ref:`I2C API ` functions like - :c:func:`i2c_transfer()`. The generated C header will also contain a macro - which expands to this string. -- **reg**: information used to address the device. This could be a - memory-mapped I/O address range (as with ``i2c@40003000``\ 's reg property), - an I2C bus address (as with ``apds9960@39`` and its devicetree siblings), a - SPI chip select line, or some other value depending on the kind of device the - node represents. +compatible + Says what kind of device the node represents. The value is a + string in the format "vendor,device", like ``"avago,apds9960"``, or a + sequence of these, like ``"ti,hdc", "ti,hdc1010"``. The build system uses + the compatible property to find the right :ref:`binding ` for the + node. + +label + The device's name according to Zephyr's :ref:`device_drivers`. The value + can be passed to :c:func:`device_get_binding()` to retrieve the + corresponding driver-level :ref:`struct device* `. This + pointer can then be passed to the correct driver API by application code to + interact with the device. For example, calling + ``device_get_binding("I2C_0")`` would return a pointer to a device + structure which could be passed to :ref:`I2C API ` functions like + :c:func:`i2c_transfer()`. The generated C header will also contain a macro + which expands to this string. + +reg + Information used to address the device. This could be a memory-mapped I/O + address range (as with ``i2c@40003000``\ 's reg property), an I2C bus + address (as with ``apds9960@39`` and its devicetree siblings), a SPI chip + select line, or some other value depending on the kind of device the node + represents. This tree has the following DTS.