Skip to content

Commit f209ac9

Browse files
committed
zephyr-build: Simplify dt-yaml syntax
The Serde "tag" rules was being used for enums, which results in enums being generated in a somewhat awkward format. Remove this, and change the syntax of the dt-rust.yaml file to match. This typically results in changes like: - type: instance value: raw: type: myself to be simplified to just: - !Instance raw: !Myself Signed-off-by: David Brown <[email protected]>
1 parent 2bbd41e commit f209ac9

File tree

1 file changed

+11
-18
lines changed

1 file changed

+11
-18
lines changed

dt-rust.yaml

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,13 @@
3030
# Hook up the gpio-keys as gpio pins as well
3131
- name: gpio-keys
3232
rules:
33-
- type: compatible
34-
value:
33+
- !Compatible
3534
names:
36-
- gpio-keys
35+
- gpio-keys
3736
level: 1
3837
actions:
39-
- type: instance
40-
value:
41-
raw:
42-
type: phandle
43-
value: gpios
38+
- !Instance
39+
raw: !Phandle gpios
4440
device: crate::device::gpio::GpioPin
4541

4642
# Flash controllers don't have any particular property to identify them, so we need a list of
@@ -85,17 +81,14 @@
8581
# I2C.
8682
- name: i2c
8783
rules:
88-
- type: compatible
89-
value:
90-
names:
91-
- "snps,designware-i2c"
92-
level: 0
84+
- !Compatible
85+
names:
86+
- "snps,designware-i2c"
87+
level: 0
9388
actions:
94-
- type: instance
95-
value:
96-
raw:
97-
type: myself
98-
device: crate::device::i2c::I2C
89+
- !Instance
90+
raw: !Myself
91+
device: crate::device::i2c::I2C
9992

10093
# Generate a pseudo node that matches all of the labels across the tree with their nodes.
10194
- name: labels

0 commit comments

Comments
 (0)