zephyr/scripts/dts
Martí Bolívar b6dc0a24f7 edtlib: improve enum support
Add enum_tokenizable and enum_upper_tokenizable to PropertySpec. These
allow a PropertySpec to declare that it both has an enumeration of
values and all of them are strings which are "tokenizable". Don't
bother extending Property with these; the user can access the
information through Property.spec now, so the extra delegation is
unnecessary.

See the docstrings for details on what "tokenizable" means. The basic
idea is that we should be able to use the DT binding's enum values as
C 'enum' enumerators in a "reasonable way".

Add val_as_token to Property. This produces a canonical token for the
property value.

Add tests for this feature in particular and property enumerations in
general.

Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
2020-12-13 19:25:24 -05:00
..
test-bindings edtlib: improve enum support 2020-12-13 19:25:24 -05:00
test-bindings-2 scripts: edtlib.py: Deprecate 'title:' 2019-12-18 11:52:45 +01:00
dtlib.py scripts: dts: convert test suites to pytest 2020-10-02 11:51:15 +02:00
edtlib.py edtlib: improve enum support 2020-12-13 19:25:24 -05:00
gen_defines.py devicetree: make DT_PROP_HAS_IDX expand to 0 or 1 2020-11-15 08:44:56 -06:00
grutils.py scripts: grutils: tweak sort keys to group siblings 2020-02-04 07:28:45 -06:00
test-multidir.dts scripts: dts: Add test for multiple binding directories 2019-08-03 14:17:49 -04:00
test.dts edtlib: improve enum support 2020-12-13 19:25:24 -05:00
testdtlib.py scripts: dts: convert test suites to pytest 2020-10-02 11:51:15 +02:00
testedtlib.py edtlib: improve enum support 2020-12-13 19:25:24 -05:00