-
Notifications
You must be signed in to change notification settings - Fork 8.2k
scripts: dts: Add generation of *_PARENT_LABEL macros #13905
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
scripts: dts: Add generation of *_PARENT_LABEL macros #13905
Conversation
Codecov Report
@@ Coverage Diff @@
## master #13905 +/- ##
==========================================
- Coverage 52.83% 51.98% -0.86%
==========================================
Files 310 309 -1
Lines 45311 45583 +272
Branches 10468 10555 +87
==========================================
- Hits 23942 23695 -247
- Misses 16584 17080 +496
- Partials 4785 4808 +23
Continue to review full report at Codecov.
|
5c6adb8 to
9cb3214
Compare
|
Rephrased the commit description. |
scripts/dts/extract_dts_includes.py
Outdated
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.
get_parent_path('/') currently returns '/', so the parent_path check will always succeed.
Maybe the check could be node_path != '/' instead, if it's needed.
Or get_parent_path() could be changed to return None for /.
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.
Returning None for / might be best. Just ran into another case where it's useful.
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.
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.
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.
I just took another look. Checking parent_path here doesn't make much sense, as it will never be None. This code is executed only for nodes that have the compatible property, hence for path '/' we won't get here. I think I'll remove this check.
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.
Yeah, no need to avoid merge conflicts with those cleanup PRs either.
9cb3214 to
ac1939f
Compare
|
Rebased on master. |
764b7fe to
fda2b31
Compare
|
Removed the no longer needed |
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.
Looks fine to me.
This patch adds generation of `*_PARENT_LABEL` macros for nodes that have a parent with a 'label' property and also have a 'label' property themselves. Signed-off-by: Andrzej Głąbek <[email protected]>
fda2b31 to
57d39b9
Compare
|
|
@anangl are you going to update this PR? Is this still relevant? |
No, I'll close it. |
This patch adds generation of
*_PARENT_LABELmacros for nodes that have a parent with a 'label' property and also have a 'label' property themselves.Such feature was requested by @pizi-nordic in order to create the device hierarchy needed in the power management rework he's doing.
Fixes: #13313