zephyr/scripts/dts/python-devicetree
Joel Hirsbrunner 8b02bc9392 Devicetree: Devicetree Bindings: Support enums for array like dt props
It is currently impossible to use enum with any array like type (i.e.
string-array and array, these are the only ones that make sense) in the
devicetree and dt-bindings.
However, there is no such remark in the dt-bindings section of the docs.
Since this is a feature that comes in very handy and is implemented
fairly easily, I adjusted the scripts for this.

It is now possible to do something like this.
```yaml
compatible = "enums"

properties:
  array-enum:
    type: string-array
    enum:
      - bar
      - foo
      - baz
      - zoo
```
```dts
/ {
	enums {
		compatible = "enums";
		array-enum = "foo", "bar";
	};
};
```

Signed-off-by: Joel Hirsbrunner <jhirsbrunner@baumer.com>
2024-10-15 04:11:36 -04:00
..
src/devicetree Devicetree: Devicetree Bindings: Support enums for array like dt props 2024-10-15 04:11:36 -04:00
tests everywhere: replace double words 2024-06-25 06:05:35 -04:00
.gitignore
requirements.txt
setup.py scripts: dts: update pyyaml version 2024-03-29 09:03:34 -04:00
tox.ini