-
Notifications
You must be signed in to change notification settings - Fork 6.9k
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: improve support for multiple compatibles #19904
Comments
Looks like
Would that get awkward? |
I don't think it'd get awkward, but it should probably be handled by an explicit entry exposed in the YAML either by making the I think we may have touched on this before somewhere, regarding the change in how If things like |
See #20289 (comment) for additional information. |
@pabigot I think the title of this issue was in error, so I've tried to fix it. Please revert if I'm wrong. |
Hi @galak, This issue, marked as an Enhancement, was opened a while ago and did not get any traction. It was just assigned to you based on the labels. If you don't consider yourself the right person to address this issue, please re-assing it to the right person. 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. @pabigot 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! |
The
st,lis12dh
driver supports multiple variants: SPI and I2C buses, and at least two variant chipsst,lis3dh
andst,lis2dh12
. PR #19901 adds a reference to the latter.In the original submission checkpatch complained about:
It appears that to make this work we need to duplicate the YAML with the name of the alternative. This means that the property descriptions are now replicated in four different binding files.
In #19624 it is proposed to add another property, which would have to be added to all those files. In an attempt to simplify that I prepared https://github.com/pabigot/zephyr/commits/pr/20191017b where the top commit refactors the properties to a file that's included by all the others.
This results in the following build failure:
It's not obvious to me how the Linux checkpatch is satisfied by having
st,lis2dh12
appear as a compatible in a filest,lis2dh12-i2c.yaml
but without that file it complains. Nor is it obvious to me how putting the properties into a common include file causes breakage of the unique-compatible rule when duplicating them in separate files does not.Nonetheless, having to replicate all properties in multiple binding files just to allow specification of variants to get past checkpatch is not a very maintainable solution. Something should be done.
The text was updated successfully, but these errors were encountered: