From 58b46d7089e92cd8a41a2dc803a84973647a8200 Mon Sep 17 00:00:00 2001 From: Ulf Magnusson Date: Mon, 9 Sep 2019 13:13:01 +0200 Subject: [PATCH] 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 --- dts/binding-template.yaml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/dts/binding-template.yaml b/dts/binding-template.yaml index c1a4e274ab7..e603568e3d0 100644 --- a/dts/binding-template.yaml +++ b/dts/binding-template.yaml @@ -89,6 +89,12 @@ sub-node: # const: # 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: #