Quoting Rob Herring (2018-04-20 11:15:04)[...]
On Fri, Apr 20, 2018 at 11:47 AM, Stephen Boyd <sboyd@xxxxxxxxxx> wrote:
Quoting Rob Herring (2018-04-18 15:29:05)
diff --git a/Documentation/devicetree/bindings/example-schema.yaml b/Documentation/devicetree/bindings/example-schema.yaml
new file mode 100644
index 000000000000..fe0a3bd1668e
--- /dev/null
+++ b/Documentation/devicetree/bindings/example-schema.yaml
+ interrupts:
+ # Either 1 or 2 interrupts can be present
+ minItems: 1
+ maxItems: 2
+ items:
+ - description: tx or combined interrupt
+ - description: rx interrupt
+
+ description: |
The '|' is needed to make yaml happy?
Yes, this is simply how you do literal text blocks in yaml.
We don't really need for this one really, but for the top-level
'description' we do. The long term intent is 'description' would be
written in sphinx/rst and can be extracted into the DT spec (for
common bindings). Grant has experimented with that some.
Ok. That sounds cool. Then we could embed links to datasheets and SVGs
too.
+ # Property names starting with '#' must be quoted
+ '#interrupt-cells':
+ # A simple case where the value must always be '2'.
+ # The core schema handles that this must be a single integer.
+ const: 2
+
+ interrupt-controller: {}
Does '{}' mean nothing to see here?
Yes. It's just an empty schema that's always valid.