-
Notifications
You must be signed in to change notification settings - Fork 6.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
drivers: mipi-dbi: use string for mipi-mode property #81293
drivers: mipi-dbi: use string for mipi-mode property #81293
Conversation
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.
LGTM, API is considered experimental
Mostly a complain about usage of strings in bindings: |
@erwango unless I'm mistaken, this is not going to increase binary size as |
Yeah, this is my understanding as well. We are expanding these strings to a C token, which the preprocessor will then handle. |
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.
Hmm I kinda get the point regarding the readbility, but imo adding a comment after each enum value would make the binding also more terse.
Additionally it kinda adds some macrobatics where the end result in a dt overlay is using a " instead of <. If the stringified version was more compact I guess there would be more to gain from this change.
But yeah neither nacking or approving, just wanted to give my two cents as I had this suggestion on one of my PRs earlier as well :^)
Yeah, I guess the advantage is that the string enum is a bit more restrictive- IE it is not possible to ignore the recommendation of "please use the MIPI DBI header to get the integer value". The output devicetree generated by the build system will also be more readable. |
:), perfect then! |
097bae8
deedbf9
to
097bae8
Compare
Use a string for the mipi-mode property over an integer value, as this significantly improves the readability of the MIPI DBI device binding. Signed-off-by: Daniel DeGrasse <[email protected]>
Document change to mipi-dbi device binding, and provide users with example of how to transition to the new mipi-mode property. Signed-off-by: Daniel DeGrasse <[email protected]>
Rebased to pick up CI fixes |
097bae8
to
e7f0d0b
Compare
Use a string for the mipi-mode property over an integer value, as this
significantly improves the readability of the MIPI DBI device binding.
Open to feedback as to whether we feel this improvement is work breaking downstream user devicetrees. Personally I think it is ok given the transition note in the migration guide, but I'm not strongly committed to this change.