dtc/tests/test_props.dts
Simon Glass 52157f13ef pylibfdt: Support boolean properties
Boolean properties are unusual in that their presense or absence
indicates the value of the property. This makes them a little painful to
support using the existing getprop() support.

Add new methods to deal with booleans specifically.

Signed-off-by: Simon Glass <sjg@chromium.org>
Message-ID: <20230912182716.248253-1-sjg@chromium.org>
Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
2023-09-15 16:00:43 +10:00

16 lines
496 B
Text

/dts-v1/;
/ {
compatible = "test_props";
prop-hex32 = <0xdeadbeef>;
prop-uint32 = <123>;
prop-int32 = <0xfffffffe>;
prop-hex64 = /bits/ 64 <0xdeadbeef01abcdef>;
prop-uint64 = /bits/ 64 <9223372036854775807>;
prop-int64 = /bits/ 64 <0xfffffffffffffffe>;
prop-int32-array = <128>, <(-16)>, <0xfffffffe>;
prop-uint32-array = <0x1>, <0x98765432>, <0xdeadbeef>;
prop-int64-array = /bits/ 64 <0x100000000 0xfffffffffffffffe>;
prop-uint64-array = /bits/ 64 <0x100000000 0x1>;
prop-bool;
};