Skip to content

rust: Add basic clock abstractions

Viresh Kumar linux-clk lkml rust-for-linux 3 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v4 Latest2 patches 0 repliesNew
  2. v32 patches 16 repliesSuperseded
  3. v22 patches 12 repliesSuperseded

Changes in v4 from the cover letter

- Enable clk abstractions only for cfg(CONFIG_COMMON_CLK) (Stephen Boyd).
- New struct implementation of Hertz.
- Added examples for all the structures.
- Make methods inline.
- Improved comments, Invariants, INVARIANT, SAFETY sections / comments, use intra-doc links.
- Other minor improvements.

Patches in v4 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2rust: Add clk helpersMAINTAINERS rust/bindings/bindings_helper.h rust/helpers/clk.c +1 more+69 -00 replies
2/2rust: Add initial clk abstractionsMAINTAINERS rust/kernel/clk.rs rust/kernel/lib.rs+307 -00 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchDaniel Almeida
1/2R-b
2/2T-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v4 thread

Cover letter [PATCH V4 0/2] rust: Add basic clock abstractions

Hello,

This adds initial abstractions for the clk APIs. These provide the minimal functionality needed for common use cases, making them straightforward to introduce in the first iteration.

These will be used by Rust based cpufreq / OPP layers to begin with.

For now I have added them under the maintainership umbrella of the common clk framework, please let me know if I should do it differently.

If possible, I would like to get these merged via the PM tree along with cpufreq/OPP abstractions, but its okay otherwise too.

Miguel: I have dropped the changes related to a Guard implementation for clk APIs as the discussion wasn't conclusive enough. Maybe we can tackle that later if required.

--
Viresh

V3->V4:
- Enable clk abstractions only for cfg(CONFIG_COMMON_CLK) (Stephen Boyd).
- New struct implementation of Hertz.
- Added examples for all the structures.
- Make methods inline.
- Improved comments, Invariants, INVARIANT, SAFETY sections / comments, use intra-doc links.
- Other minor improvements.

V2->V3:
- Add type Hertz (Daniel Almeida).
- Improved comments in helpers.rs (Daniel Almeida).
- s/Clk::new/Clk::get/ (Daniel Almeida).
- Implement OptionalClk as well (Rob Herring).
- Fix Safety comments (Danilo Krummrich).
- Add tags from Daniel Almeida.

V1->V2:
- Post this as an independent series.
- Include more APIs, apart from clk_get() and clk_put().

Viresh Kumar (2):
rust: Add clk helpers
rust: Add initial clk abstractions

 MAINTAINERS                     |   2 +
 rust/bindings/bindings_helper.h |   1 +
 rust/helpers/clk.c              |  66 +++++++
 rust/helpers/helpers.c          |   1 +
 rust/kernel/clk.rs              | 304 ++++++++++++++++++++++++++++++++
 rust/kernel/lib.rs              |   2 +
 6 files changed, 376 insertions(+)
 create mode 100644 rust/helpers/clk.c
 create mode 100644 rust/kernel/clk.rs
Signature · 1 line
2.31.1.272.g89b43f80a514