Skip to content
Permalink
Browse files

dts/bindings: Clarify #cells in template

Add a device tree example to make it easier to see how things fit
together.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
  • Loading branch information...
ulfalizer authored and galak committed Jul 9, 2019
1 parent aa8e13c commit 8977d5b317f12b6f742721e57f181ed6b214618e
Showing with 14 additions and 3 deletions.
  1. +14 −3 dts/bindings/device_node.yaml.template
@@ -71,12 +71,23 @@ properties:
description: required interrupts
generation: define

# If a node is an interrupt controller, GPIO controller, pinmux device, or any
# device referenced via a phandle plus some number of cells, then the cell
# fields below must be present
# If the binding describes an interrupt controller, GPIO controller, pinmux
# device, or any other device referenced via a phandle plus a specifier (some
# additional data besides the phandle), then the cells in the specifier must be
# listed in '#cells', like below.

"#cells":
- cell0 # name of first cell
- cell1 # name of second cell
- cell2 # name of third cell
- and so on and so forth

# If the specifier is empty (e.g. '#clock-cells = <0>'), then '#cells' can
# either be omitted (recommended) or set to an empty array. Note that an empty
# array is specified as '"#cells": []' in YAML.
#
# For example, say that some device tree node has 'foo-gpios = <&gpio1 1 2>'.
# The <1 2> part of the property value is the specifier, with two cells in this
# example. The node pointed at by &gpio1 is expected to have
# '#gpio-cells = <2>', and its binding should have two elements in '#cells',
# corresponding to the 1 and 2 values above.

0 comments on commit 8977d5b

Please sign in to comment.
You can’t perform that action at this time.