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.
Based on pwm/for-next.
Signed-off-by: Maurice Hieronymus <mhi@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 | 8 +++----
rust/kernel/clk.rs | 60 +++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 63 insertions(+), 5 deletions(-)
---
base-commit: 5b5e33c44a491d5b5e019f527e028bd567a226fa
change-id: 20260526-rate-exclusive-get-th1520-764a949de18e
Best regards,
--
Maurice Hieronymus <mhi@mailbox.org>