Skip to content
Commit 8b02bc93 authored by Joel Hirsbrunner's avatar Joel Hirsbrunner Committed by Anas Nashif
Browse files

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: default avatarJoel Hirsbrunner <jhirsbrunner@baumer.com>
parent 85b03949
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment