Thread (10 messages) 10 messages, 4 authors, 2025-08-29

Re: [PATCH 1/3] clk: Introduce clk_hw_set_spread_spectrum

From: Peng Fan <hidden>
Date: 2025-08-29 07:57:00
Also in: arm-scmi, linux-clk, lkml

On Wed, Aug 27, 2025 at 11:45:19AM -0400, Brian Masney wrote:
On Tue, Aug 12, 2025 at 08:17:05PM +0800, Peng Fan wrote:
quoted
Add clk_hw_set_spread_spectrum to configure a clock to enable spread
spectrum feature. set_spread_spectrum ops is added for clk drivers to
have their own hardware specific implementation.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 drivers/clk/clk.c            | 32 ++++++++++++++++++++++++++++++++
 include/linux/clk-provider.h | 29 +++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+)
diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
index b821b2cdb155331c85fafbd2fac8ab3703a08e4d..48c7a301b72b30fd824dae7ada2c44ee84d40867 100644
--- a/drivers/clk/clk.c
+++ b/drivers/clk/clk.c
@@ -2802,6 +2802,38 @@ int clk_set_max_rate(struct clk *clk, unsigned long rate)
 }
 EXPORT_SYMBOL_GPL(clk_set_max_rate);
 
+int clk_hw_set_spread_spectrum(struct clk_hw *hw, unsigned int modfreq_hz,
+			       unsigned int spread_bp, unsigned int method)
                                                      ^^^^^^^^^^^^
Should this be 'enum clk_ssc_method'?

Also can you add kernel docs for all of the parameters? I know it's
documented on 'struct clk_spread_spectrum' below.

What do you think about having this function take that struct instead as
a parameter to match what's on the clk op?
Yeah. Dan has raised similar comment, I will change to use
struct clk_spread_spectrum as the 2nd param.

Thanks,
Peng
Brian
  
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help