Skip to content
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: edtlib: Forbid multiple bindings with the same compatible + Node.description nit #19806

Merged
merged 2 commits into from
Oct 15, 2019

Conversation

ulfalizer
Copy link
Collaborator

@ulfalizer ulfalizer commented Oct 14, 2019

One new binding-related error (to fix #19536) and an unrelated cleanup:

scripts: edtlib: Forbid multiple bindings with the same compatible

Previously, if two bindings had the same 'compatible:'/'parent-bus:'
values, the binding that happened to be loaded last would get used.

Turn it into an error instead. This avoids tricking people into thinking
that bindings get loaded in a defined order.

Maybe overriding bindings could be allowed later, if we need it.
scripts: edtlib: Turn Node.description into a @property

Simplifies the code a bit.

Looks like the description wasn't rstrip()ed when it came from a
'child-binding:' either. This also indirectly fixes that.

Simplifies the code a bit.

Looks like the description wasn't rstrip()ed when it came from a
'child-binding:' either. This also indirectly fixes that.

Signed-off-by: Ulf Magnusson <[email protected]>
Previously, if two bindings had the same 'compatible:'/'parent-bus:'
values, the binding that happened to be loaded last would get used.

Turn it into an error instead. This avoids tricking people into thinking
that bindings get loaded in a defined order.

Maybe overriding bindings could be allowed later, if we need it.

Fixes: zephyrproject-rtos#19536

Signed-off-by: Ulf Magnusson <[email protected]>
@ulfalizer ulfalizer force-pushed the duplicate-compatible branch from cd6865e to 618b38f Compare October 14, 2019 16:16
Copy link
Collaborator

@pabigot pabigot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems ok, though I don't think we're prepared to deal with the same compatible on different buses.

@carlescufi carlescufi merged commit e311380 into zephyrproject-rtos:master Oct 15, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

devicetree bindings path misinterpreted
3 participants