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

Devicetree: allow one binding to match multiple compatibles #20669

Open
mbolivar opened this issue Nov 13, 2019 · 7 comments
Open

Devicetree: allow one binding to match multiple compatibles #20669

mbolivar opened this issue Nov 13, 2019 · 7 comments
Assignees
Labels
area: Devicetree Enhancement Changes/Updates/Additions to existing features priority: low Low impact/importance bug

Comments

@mbolivar
Copy link
Contributor

Is your enhancement proposal related to a problem? Please describe.

I would like to be able to write a single devicetree bindings file that allows multiple compatibles to match it.

This will allow me to write a single binding for a single compatible family of devices made by multiple vendors. My particular use case is WS2812 and SK6812 LED controllers, so I want to be able to write:

compatible: ["worldsemi,ws2812-spi", "szledcolor,sk6812-spi"]

Describe the solution you'd like

The above should match devicetree nodes with either of the compatibles in the list.

Describe alternatives you've considered

I could write multiple bindings files that each have their own compatible and include a common one. This feels inelegant and repetitive, however.

Additional context

N/A

@mbolivar mbolivar added Enhancement Changes/Updates/Additions to existing features priority: low Low impact/importance bug area: Devicetree labels Nov 13, 2019
@mbolivar
Copy link
Contributor Author

from @galak on slack, for the record:

we need to spec if the list is tried as 'x' OR 'y' OR 'z' ... vs 'x' AND 'y' AND 'z' ...

@ulfalizer
Copy link
Collaborator

I had a PR that added this earlier, but it was rejected then. Can't remember which PR it was part of ATM though.

@ulfalizer
Copy link
Collaborator

from @galak on slack, for the record:

we need to spec if the list is tried as 'x' OR 'y' OR 'z' ... vs 'x' AND 'y' AND 'z' ...

Should be an OR thing I think. If you want to put other restrictions on compatible, properties: might be a better place to do it, since that's where restrictions on properties are normally added.

@mbolivar
Copy link
Contributor Author

Should be an OR thing I think.

I think I agree about this. The variant-compatible scheme seems to be along those lines also.

@pabigot
Copy link
Collaborator

pabigot commented Nov 15, 2019

Cross-link with #20289 and #19904.

@ulfalizer
Copy link
Collaborator

I still need to find that old PR too. Had it all implemented, basically.

@zephyrbot
Copy link
Collaborator

Hi @galak,

This issue, marked as an Enhancement, was opened a while ago and did not get any traction. Please confirm the issue is correctly assigned and re-assign it otherwise.

Please take a moment to review if the issue is still relevant to the project. If it is, please provide feedback and direction on how to move forward. If it is not, has already been addressed, is a duplicate, or is no longer relevant, please close it with a short comment explaining the reason.

@mbolivar you are also encouraged to help moving this issue forward by providing additional information and confirming this request/issue is still relevant to you.

Thanks!

@rruuaanng rruuaanng self-assigned this Dec 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: Devicetree Enhancement Changes/Updates/Additions to existing features priority: low Low impact/importance bug
Projects
None yet
Development

No branches or pull requests

6 participants