-
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: Allow all GPIO flags to be used by devicetree #29908
Comments
This is contrary to policy about not deviating from Linux devicetree compatibility, so going to dev-review. |
This doesn't explain why the flags need to be in DTS v code? |
As the GPIO configuration are board specific (same GPIO can be open drain in one board and push pull in another board based on the design) . We can't handle the GPIO flags seamlessly in code if the plan is to define GPIOs in devicetree. |
But pull and open-drain flags are supported in devicetree bindings. What you can't specify is things like direction, which should be easy to provide in code at the point the GPIO is configured. |
ACK, yes direction + interrupt modes |
So for that: I'm against this, because I haven't seen an argument that says why we need in devicetree any flags that aren't already supported. Why can't direction and interrupt mode be configured in code? |
ACK, here are additional scenarios where we would need a robust devicetree if GPIOs are added in devicetree format
rest of the input / output / interrupts can be handled in the code with multiple defines c code might not look clean. if coming from input |
this is the proposed PR with minimalist change to device tree file db65d17#diff-8c48a03ca88701931789a75b27aab77acd9d6ff11592f948cc71cbc2a9c0469f |
Not sure I understand this case. Seems like we can specify that already with |
sorry, pull-up is not a good example.
|
So I think we've covered 1 & 2. For 3 this would be a vendor specific flag and I don't have any particular issue with that. |
Is [3] referring to power-source property at https://www.kernel.org/doc/Documentation/devicetree/bindings/pinctrl/pincfg-node.yaml? |
thank you all for the feedback. |
Introduction
This section targets end users, TSC members, maintainers and anyone else that might
need a quick explanation of your proposed change.
Problem description
Why do we want this change and what problem are we trying to address?
Proposed change
support more GPIO flags in "include/dt-bindings/gpio/gpio.h"
Detailed RFC
GPIO flags in devicetree binding "include/dt-bindings/gpio/gpio.h" have only few GPIO flags.
For an Embedded Controller we need more GPIO flags to configure the devices of the system,
ideally GPIO flags available in "include/drivers/gpio.h". Hence, need to support more GPIO flags in "include/dt-bindings/gpio/gpio.h"
Proposed change (Detailed)
Adding more GPIO flags in dt-binding can be done in multiple ways
typedefs, ints , enums etc
Dependencies
None, may deviate from standard Linux config
Concerns and Unresolved Questions
None
Alternatives
None
The text was updated successfully, but these errors were encountered: