-
Notifications
You must be signed in to change notification settings - Fork 7k
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
Miscellaneous devicetree improvements and cleanups #55105
Miscellaneous devicetree improvements and cleanups #55105
Conversation
f70ee04
to
59cd151
Compare
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.
Can you pull the cmake change into its own PR. Thus @tejlmand can review that separately from the python lib changes.
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.
Can you also split out the 'python-devicetree: re-work reg and ranges handling ' commit into its own PR. All the other cleanup commits look good and will +1 (after the minor fix that was already mentioned).
Adding 'reg' and 'ranges' to dtlib.py concerns me as dtlib doesn't generally have much understanding of the contents of the tree. I think it best to try and maintain that abstraction/separation. I'd rather see 'reg' and 'ranges' add to edtlib.py.
That would defeat the purpose of being able to use them in sysdtlib, though, where we aren't using edtlib (because we don't need any bindings), but we still need to understand the DTSpec portions of the tree (to rewrite registers). |
The standard way we write this in the library is 'documentation string', not 'docstring'. Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
59cd151
to
407c402
Compare
Introduce a context manager that will save some typing when dealing with expected exceptions. Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Using dtlib_raises() throughout the test cases saves some typing. Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This helper lets you place a node (really the entire subtree rooted at that node) elsewhere in the devicetree. This will be useful when adding system devicetree support, when we'll want to be able to, for example, move the CPU cluster node selected by the current execution domain to /cpus. Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
There's no need for _parse_node() to return the Node instance that is its sole argument. The only user of the return value is a dead store. Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
The following section of code has nothing public inside. Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This allows mypy to check the internal variable type annotations within the function. Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
We need to have an _include_path attribute to pretty-print this object from within pdb, for some reason. Add it. Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
Trivial fix. Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
This will make it more convenient to use it from multiple different places, which we will have a need for in the future. Signed-off-by: Martí Bolívar <marti.bolivar@nordicsemi.no>
407c402
to
7366154
Compare
@galak sorry, I caught an issue and pushed another change |
Hmm, what's up with the scancode license? |
I asked about this in |
Nothing. License check failure on any non-Apache 2.0 files being added to the tree is normal. If sanctioned, the check failure can be overridden. |
License check failure on any non-Apache 2.0 files being added to the
tree is normal. If sanctioned, the check failure can be overridden.
This code is being copy/pasted from a file which already has a BSD 3
clause license, so we have to keep this license.
|
This is a subset of the patches in #52272 that are standalone improvements and can IMO be merged now.