Allow for having array types (array, uint8-array, string-array) be const.
This would allow for something like:
properties:
reg-names:
const: ["foo", "bar"]
To be supported.
Renamed function _check_prop_type_and_default to _check_prop_by_type
as part of this change and Moved the check for 'const' types into
_check_prop_by_type as its similar to the prop_type check and it was
easier to implement in _check_prop_by_type as we already extract
prop_type from the option in that function.
Signed-off-by: Kumar Gala <galak@kernel.org>
52 lines
887 B
YAML
52 lines
887 B
YAML
# SPDX-License-Identifier: BSD-3-Clause
|
|
|
|
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
|
|
const: ['foo', 'bar', 'baz']
|
|
|
|
phandle-ref:
|
|
type: phandle
|
|
|
|
phandle-refs:
|
|
type: phandles
|
|
|
|
phandle-array-foos:
|
|
type: phandle-array
|
|
|
|
phandle-array-foo-names:
|
|
type: string-array
|
|
|
|
# There's some slight special-casing for GPIOs in that 'foo-gpios = ...'
|
|
# gets resolved to #gpio-cells rather than #foo-gpio-cells, so test that
|
|
# too
|
|
foo-gpios:
|
|
type: phandle-array
|
|
|
|
path:
|
|
type: path
|