-
Notifications
You must be signed in to change notification settings - Fork 8.2k
devicetree: Add DT_CHILD_BY_REG_ADDR #99120
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
base: main
Are you sure you want to change the base?
Conversation
9bf2b99 to
e3c70ba
Compare
e51dfee to
5eac67f
Compare
| zassert_equal(DT_PROP(DT_INST_CHILD(0, child_b), val), 1, ""); | ||
| zassert_equal(DT_PROP(DT_INST_CHILD(0, child_c), val), 2, ""); | ||
|
|
||
| zassert_equal(DT_PROP(DT_CHILD_BY_REG_ADDR(DT_NODELABEL(test_children), 0, 0xa), |
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.
It seems that no scene with idx 1 has been added :)
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.
Added tests for idx 1.
Fix dts formatting issues with dts-linter. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
Allow fetching child node identifiers by reg address. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
c5ab251 to
2da83db
Compare
Introduce test cases to the devicetree API test suite for DT_CHILD_BY_REG_ADDR and DT_INST_CHILD_BY_REG_ADDR. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
The macro to initialise a struct adc_dt_spec instance uses a FOREACH macro, which can be problematic when nesting in other FOREACH macros, for example in driver implementations. Replace it with DT_CHILD_BY_REG_ADDR. Signed-off-by: Pieter De Gendt <pieter.degendt@basalte.be>
2da83db to
fa20529
Compare
|



Allow fetching child node identifiers by reg address.