-
Notifications
You must be signed in to change notification settings - Fork 6.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
dts: gen_defines.py: Support generating static initializers for nodes #21393
Conversation
@KAGA164 Might make sense to have it ignore |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Block until we come to agreement in #21369 about how devicetree paths are to be mapped to symbols that won't conflict.
Also the implicit dependency on the order that properties are listed in the binding is not maintainable.
@ulfalizer Thanks for this feature. This is exactly what I need. |
should_write() returns False for properties that are skipped in write_properties(). Helps shorten write_properties() a bit. Want to keep it manageable when adding some new stuff. Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Add a new 'generate-child-initializer' flag to bindings. When 'true', static initializers will be generated for all child nodes of the node, along with an initializer for an array that includes all the child nodes. This can be used to statically initialize structures and arrays derived from devicetree data, e.g. for a list of LEDs. See the updated documentation in doc/binding-template.yaml for more information. Fixes: zephyrproject-rtos#21239 Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
The "{" + ", ".join(...) + "}" pattern is in a bunch of places now. Add an out_dev_init() helper for it, with the same parameters as out_dev(). Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
5fb4d1f
to
1134a4f
Compare
Closing this as we are moving to the new generator / dt macro's |
Documentation (from the updated
dts/binding-template.yaml
):Main commit:
Misc. refactoring: