mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v4 0/2] rust: clk: Add ExclusiveClk and use it in pwm-th1520
@ 2026-07-11 10:16 Maurice Hieronymus
  2026-07-11 10:16 ` [PATCH v4 1/2] rust: clk: Add `ExclusiveClk` wrapper for `clk_rate_exclusive_get` Maurice Hieronymus
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Maurice Hieronymus @ 2026-07-11 10:16 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Miguel Ojeda, Boqun Feng,
	Gary Guo, Björn Roy Baron, Benno Lossin, Andreas Hindborg,
	Alice Ryhl, Trevor Gross, Danilo Krummrich, Drew Fustini,
	Guo Ren, Fu Wei, Michal Wilczynski, Uwe Kleine-König,
	Brian Masney
  Cc: Daniel Almeida, linux-clk, rust-for-linux, linux-kernel,
	linux-riscv, linux-pwm, Maurice Hieronymus

Add a Rust binding for clk_rate_exclusive_get() / clk_rate_exclusive_put()
and use it in pwm-th1520, which previously carried a TODO noting the
missing binding.

Signed-off-by: Maurice Hieronymus <mhi@mailbox.org>
---
Changes in v4:
- Rebased on v5 of https://lore.kernel.org/rust-for-linux/20260706-clk-type-state-v5-0-67c5f326a16c@collabora.com/
- Link to v3: https://lore.kernel.org/r/20260628-rate-exclusive-get-th1520-v3-0-c7ca3ebcf60f@mailbox.org

Changes in v3:
- Add #[inline] to Clk::rate_exclusive_get() (Onur Özkan)
- Drop intra-doc links from the regular SAFETY comments (Onur Özkan)
- Rebase on Daniel Almeida's Clk type-state pattern
  https://lore.kernel.org/rust-for-linux/20260618-clk-type-state-v4-0-8be082786080@collabora.com/
- Use vertical imports in pwm_th1520.rs
- Link to v2: https://lore.kernel.org/r/20260605-rate-exclusive-get-th1520-v2-0-695640bf7249@mailbox.org

Changes in v2:
- Rebase on pwm/for-next
- Remove newline after [`clk_rate_exclusive_get`] comment
- Remove unused [`struct clk`] link
- Put semicolon outside of unsafe block
- Link to v1: https://lore.kernel.org/r/20260526-rate-exclusive-get-th1520-v1-0-34cf034e1764@mailbox.org

---
Maurice Hieronymus (2):
      rust: clk: Add `ExclusiveClk` wrapper for `clk_rate_exclusive_get`
      pwm: th1520: Lock clock rate with clk_rate_exclusive_get

 drivers/pwm/pwm_th1520.rs | 18 ++++++++-----
 rust/kernel/clk.rs        | 67 +++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 79 insertions(+), 6 deletions(-)
---
base-commit: 92010229c4b38897f1319d260162d2f96925ed17
change-id: 20260526-rate-exclusive-get-th1520-764a949de18e
prerequisite-change-id: 20250909-clk-type-state-c01aa7dd551d:v5
prerequisite-patch-id: 2d3dc45c241d9062a0d2546ec649eec7970fa50a
prerequisite-patch-id: 67ad535fe110207ebc79045ba022ebb7137b0309
prerequisite-patch-id: 3d1d8ee5c2a4957edd0807b7a5cb65dabab345b5
prerequisite-patch-id: e2659037b8aaf51831da099cc568ad5b3c24a4dd

Best regards,
-- 
Maurice Hieronymus <mhi@mailbox.org>


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-10-20 13:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-07-11 10:16 [PATCH v4 0/2] rust: clk: Add ExclusiveClk and use it in pwm-th1520 Maurice Hieronymus
2026-07-11 10:16 ` [PATCH v4 1/2] rust: clk: Add `ExclusiveClk` wrapper for `clk_rate_exclusive_get` Maurice Hieronymus
2026-07-11 10:16 ` [PATCH v4 2/2] pwm: th1520: Lock clock rate with clk_rate_exclusive_get Maurice Hieronymus
2026-10-20 12:59 ` [PATCH v4 0/2] rust: clk: Add ExclusiveClk and use it in pwm-th1520 Uwe Kleine-König
2026-10-20 13:03   ` Daniel Almeida

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®