forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 465
rust: add initial common clock framework bindings #593
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
wedsonaf
merged 1 commit into
Rust-for-Linux:rust
from
m-falkowski1:add_initial_common_clk_bindings
Jan 12, 2022
Merged
rust: add initial common clock framework bindings #593
wedsonaf
merged 1 commit into
Rust-for-Linux:rust
from
m-falkowski1:add_initial_common_clk_bindings
Jan 12, 2022
Conversation
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
kpp
reviewed
Dec 11, 2021
wedsonaf
suggested changes
Dec 11, 2021
acdee17
to
0479913
Compare
The new version has just been uploaded. Feel free to review. |
kpp
reviewed
Dec 29, 2021
wedsonaf
reviewed
Dec 29, 2021
wedsonaf
reviewed
Dec 29, 2021
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.
Thanks for following up on this. This is looking good.
fbq
reviewed
Jan 4, 2022
This patch adds initial abstractions including: - `Clk` wrapper around `struct clk *`. - Binding of clk_get() method implemented as a method of `device::RawDevice` trait. - `EnableClk` that is an invariant of the `Clk` type that manages usage of the disable_unprepare() function. - Routines get_rate() and prepare_enable() implemented as methods of `Clk` type. Signed-off-by: Maciej Falkowski <[email protected]>
0479913
to
632ef86
Compare
The |
wedsonaf
approved these changes
Jan 12, 2022
10 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This patch adds initial abstractions including:
Clk
wrapper aroundstruct clk *
.once as an associated method of
Clk
typeand second as a method of
device::RawDevice
trait.implemented as methods of
Clk
type.This patch is a dependency of a Samsung Exynos trng driver provided initially in #554.
Changes v3 -> v4:
Clk::get()
. rust: add initial common clock framework bindings #593 (comment)EnableClk
variant of theClk
type that manages the useof the
bindings::clk_disable_unprepare()
function. rust: add initial common clock framework bindings #593 (comment)Changes v2 -> v3:
devm_clk_get()
has been removed and replaceswith
bindings::clk_get()
variant. rust: add initial common clock framework bindings #593 (comment)Drop
trait forClk
structure that callsbindings::clk_put
.(*self).0
->self.0
. rust: add initial common clock framework bindings #593 (comment)to_result()
method instead of checking error code explicitly. rust: add initial common clock framework bindings #593 (comment)id
field ofClk::get()
method is now optional, preciselyOption<&CStr>
. rust: add initial common clock framework bindings #593 (comment) and rust: add initial common clock framework bindings #593 (comment)Clk::get()
todevice::RawDevice
trait. rust: add initial common clock framework bindings #593 (comment)Changes v1 (#554) -> v2:
Clk
type Add Samsung Exynos true random number generator driver #554 (comment)Clk
type Add Samsung Exynos true random number generator driver #554 (comment)#[cfg(CONFIG_COMMON_CLK)]
in a module declaration atrust/kernel/lib.rs
.devm_clk_get()
uses nowdevice::RawDevice
to get access to a raw device pointer based on 6f94f6a.Signed-off-by: Maciej Falkowski [email protected]