Skip to content

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

Conversation

m-falkowski1
Copy link

@m-falkowski1 m-falkowski1 commented Dec 8, 2021

This patch adds initial abstractions including:

  • Clk wrapper around struct clk *.
  • Binding of clk_get() method implemented
    once as an associated method of Clk type
    and second as a method of device::RawDevice trait.
  • Routines get_rate() and prepare_enable(),
    implemented as methods of Clk type.

This patch is a dependency of a Samsung Exynos trng driver provided initially in #554.

Changes v3 -> v4:

Changes v2 -> v3:

Changes v1 (#554) -> v2:

Signed-off-by: Maciej Falkowski [email protected]

@m-falkowski1 m-falkowski1 force-pushed the add_initial_common_clk_bindings branch from acdee17 to 0479913 Compare December 29, 2021 19:00
@m-falkowski1
Copy link
Author

The new version has just been uploaded. Feel free to review.

Copy link

@wedsonaf wedsonaf left a 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.

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]>
@m-falkowski1 m-falkowski1 force-pushed the add_initial_common_clk_bindings branch from 0479913 to 632ef86 Compare January 12, 2022 16:25
@m-falkowski1
Copy link
Author

The v4 version has just been uploaded. Feel free to review.

@wedsonaf wedsonaf merged commit c871b6d into Rust-for-Linux:rust Jan 12, 2022
@m-falkowski1 m-falkowski1 deleted the add_initial_common_clk_bindings branch February 16, 2022 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants