Instead of
properties:
compatible:
constraint: "foo"
, just have
compatible: "foo"
at the top level of the binding.
For backwards compatibility, the old 'properties: compatible: ...' form
is still accepted for now, and is treated the same as a single-element
'compatible:'.
The old syntax was inspired by dt-schema (though it isn't
dt-schema-compatible), which is in turn a thin wrapper around
json-schema (the idea is to transform .dts files into YAML and then
verify them).
Maybe the idea was to gradually switch the syntax over to dt-schema and
then be able to use unmodified dt-schema bindings, but dt-schema is
really a different kind of tool (a completely standalone linter), and
works very differently from our stuff (see schemas/dt-core.yaml in the
dt-schema repo to get an idea of just how differently).
Better to keep it simple.
This commit also piggybacks some clarifications to the binding template
re. '#cells:'.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
40 lines
583 B
YAML
40 lines
583 B
YAML
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
title: Device.props test
|
|
description: Device.props test
|
|
|
|
compatible: "props"
|
|
|
|
properties:
|
|
nonexistent-boolean:
|
|
type: boolean
|
|
|
|
existent-boolean:
|
|
type: boolean
|
|
|
|
int:
|
|
type: int
|
|
const: 1
|
|
|
|
array:
|
|
type: array
|
|
|
|
uint8-array:
|
|
type: uint8-array
|
|
|
|
string:
|
|
type: string
|
|
const: "foo"
|
|
|
|
string-array:
|
|
type: string-array
|
|
|
|
phandle-ref:
|
|
type: phandle
|
|
|
|
phandle-refs:
|
|
type: phandles
|
|
|
|
phandle-refs-and-vals:
|
|
type: phandle-array
|