-
Notifications
You must be signed in to change notification settings - Fork 5.3k
[drivers][rtc] fix rtc assert #9804
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
没有看懂 麻烦增加一些解释 这里为什么删除了这行
Uh oh!
There was an error while loading. Please reload this page.
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.
原本是这样的,在软件rtc驱动中有个rt_soft_rtc_sync,但是其中的source_device句柄是没有进行初始化的,所以这里把这个句柄传递了下,但是后面看了看,dev_soft_rtc.c这个驱动文件中,还调用了硬件驱动的ops,这块感觉还是需要独立开的;
除此之外,rt_soft_rtc_sync是通过一个工作队列的机制去做的同步,原本的驱动之所以有source_device和soft_rtc_dev两个设备句柄,我感觉是为了这个rtc也能够同步硬件rtc设备,但是不应该放在这里一起去弄,本身也不合理;
我这里又重新提交了一份,现在看应该会清晰些,rtc的同步就暂时给软件rtc去使用,硬件的话不需要应该问题也不大,本身是硬件的机制,容错率更高。