-
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
devicetree bindings path misinterpreted #19536
Comments
I thought having multiple bindings provide the same compatible was an error, until I remembered that that check is only done for filenames in Is this something you'd use, or just something you noticed? |
It is something that I have thought I might use: for example to change defaults, or add new properties for a custom driver that needs them. It becomes more clearly useful if we start following Linux and specifying multiple compatibles in the binding because a driver supports multiple compatibles. There I may want to substitute a driver for one, but not all, of the listed compatibles, and provide additional functionality in that driver that requires more information about the device. So I think multiple bindings with the same There are two acceptable solutions in my view:
What's really not acceptable is discarding the locally provided binding in favor of a generic one and not saying anything about it. So "something must be done". It should probably be the same for |
PR to turn it into an error: #19806 |
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]>
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: #19536 Signed-off-by: Ulf Magnusson <[email protected]>
The Cmake/environment variable
DTS_ROOT_BINDINGS
provides a list of places that are searched for bindings files, which defaults to includedts/bindings
found inAPPLICATION_SOURCE_DIR
,BOARD_DIR
, andZEPHYR_BASE
in that order. The expectation is that a binding for a specific compatible will be selected from the first location where it is found.It appears that the current tooling picks the binding in the last directory searched. This is contrary to expected behavior.
The text was updated successfully, but these errors were encountered: