dts: binding-template.yaml: Document how 'type: boolean' works

It's a bit subtle in that it's the only type where a property can
generate output even if it doesn't exist.

Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
This commit is contained in:
Ulf Magnusson 2019-09-09 13:13:01 +02:00 committed by Kumar Gala
commit 58b46d7089

View file

@ -89,6 +89,12 @@ sub-node:
# const: <string | int>
# default: <default>
#
# 'type: boolean' is for properties used as flags that don't take a value, e.g.
# 'hw-flow-control;'. The macro generated for the property gets set to 1 if the
# property exists on the node, and to 0 otherwise. When combined with
# 'required: true', this type just forces the flag to appear on the node,
# though the output will always be the same in that case (1).
#
# 'type: uint8-array' is for what the device tree specification calls
# 'bytestring'. Properties of type 'uint8-array' should be set like this:
#