- Notifications
You must be signed in to change notification settings - Fork 8.2k
drivers: serial: Implement serial wrapper to add DTR output #96578
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
Conversation
9f01356 to e960979 Compare | Refactored the driver a bit.
Only the asynchronous API has been properly used against a real UART driver (nrfx-uarte). |
e960979 to ed6c9ee Compare 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.
Why do we need a new zephyr,uart-dt
| @@ -0,0 +1,16 @@ | |||
| description: UART DTR Wrapper Driver | |||
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.
The binding is a bit too unclear to merge as-is in my opinion especially since this is clearly a binding meant to be introduced purely to allocate a struct device. The description doesn't make it clear that it's for power management, etc... did you consider any alternative approaches here? I'm kind of skeptical about this approach even though I do agree with your goal and would like to help get this PR merged.
| I have now simplified the driver and removed all the logic that should have been in the upper layer. So this driver is now nothing else than a wrapper that adds a DTR GPIO output to an existing UART. So now the DTR pin follows the power state of the UART. |
The question is about why we need the new binding at all
right, and from looking at this, I think I would like to keep it that way for the reasons I explained in my comment.
We don't typically add an entire child node and generic binding to cover a single pin. |
This driver wraps an existing UART device and adds DTR (Data Terminal Ready) GPIO output for a runtime power management. When the UART is powered off, DTR is deasserted. When the UART is powered on, DTR is asserted. This allows remote end to shut down the UART when DTR is deasserted. Signed-off-by: Seppo Takalo <seppo.takalo@nordicsemi.no>
|
| Updated the documentation to show the use case for this driver: After being open for almost a month, still no-one has suggested any alternatives. Other examples: |
| @dcpleung please review and provide your feedback. |
| I'll close this in favor of alternative solution in #98145 |




This driver wraps an existing UART device and adds DTR (Data Terminal Ready) output for a runtime power management.
When the UART is powered off, DTR is deasserted.
When the UART is powered on, DTR is asserted.
This allows remote end to shut down the UART when DTR is deasserted.