-
Notifications
You must be signed in to change notification settings - Fork 6.5k
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
Allow on-demand initialization of Zephyr drivers in USER program #60209
Labels
Enhancement
Changes/Updates/Additions to existing features
Comments
@lmajewski this reads a bit like a duplicate of #40385, would you agree? See also #20012 |
The first use case (i.e. "Add the ability to manually initialize a device:") of #40385 seems to be what I do exactly need. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Is your enhancement proposal related to a problem? Please describe.
The use case is as follows:
Temporary solution used
Now, there is a special
SYS_INIT()
hook function to always enable the power for the "expected" PHY IC module no matter if it is really present or not.Such approach has several issues:
Describe the solution you'd like
The desired solution would be to allow the "user application" to call initialization code for the driver (i.e. pin control, PHY, ETH). In that way we could circumvent issue raised in #30692, so all the burden of multiple boards' variants support would be moved to user application without the need to massively modify Zephyr (with proper examples and documentation, so others could easily follow).
It also looks like the "support for disabled devices from DTS" may help as well (#19448).
In principle: now we do have
APPLICATION
initialization level inSYS_INIT()
, which indicates driver initialization just before entering themain()
function.Maybe new keyword could be added (e.g.
USER
) to indicate that Zephyr's kernel driver (now disabled in DTS) would be initialized in user application?Describe alternatives you've considered
It looks like Run Time Power Management [PM] could at least mimic to some degree the above functionality.
The PHY driver would be started with PM initialized as disabled. Then user application would start the transfer for the first time (and enabled power for it). After this - the PM would be disabled, so the device would be always ON.
However, this approach lacks the flexibility - so the problem with e.g. pin control for multiple add-on boards is not solved.
To sum up:
The text was updated successfully, but these errors were encountered: