[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CAMuHMdWn+sKiC1B4MF1vHwS2ArFYQXGzpYi2EcsyERPSCc9bvQ@mail.gmail.com>
Date: Thu, 13 Feb 2025 11:06:01 +0100
From: Geert Uytterhoeven <geert@...ux-m68k.org>
To: "Peng Fan (OSS)" <peng.fan@....nxp.com>
Cc: Michael Turquette <mturquette@...libre.com>, Stephen Boyd <sboyd@...nel.org>,
Russell King <linux@...linux.org.uk>, Sudeep Holla <sudeep.holla@....com>,
Cristian Marussi <cristian.marussi@....com>, Abel Vesa <abelvesa@...nel.org>,
linux-clk@...r.kernel.org, linux-kernel@...r.kernel.org,
arm-scmi@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
Rob Herring <robh@...nel.org>, Krzysztof Kozlowski <krzk@...nel.org>,
Dario Binacchi <dario.binacchi@...rulasolutions.com>, Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>, Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>, imx@...ts.linux.dev, Peng Fan <peng.fan@....com>
Subject: Re: [PATCH v2 1/4] clk: Introduce clk_hw_set_spread_spectrum
Hi Peng,
On Wed, 5 Feb 2025 at 10:51, Peng Fan (OSS) <peng.fan@....nxp.com> wrote:
> From: Peng Fan <peng.fan@....com>
>
> 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@....com>
Thanks for your patch!
> --- a/include/linux/clk-provider.h
> +++ b/include/linux/clk-provider.h
> @@ -84,6 +84,28 @@ struct clk_duty {
> unsigned int den;
> };
>
> +/* Aligned with dtschema/schemas/clock/clock.yaml */
> +enum clk_ssc_method {
> + CLK_SSC_CENTER_SPREAD,
> + CLK_SSC_UP_SPREAD,
> + CLK_SSC_DOWN_SPREAD,
> +};
> +
> +/**
> + * struct clk_spread_spectrum - Structure encoding spread spectrum of a clock
> + *
> + * @modfreq: Modulation frequency
> + * @spreadpercent: Modulation percent
E.g. Renesas R-Car V4M also supports 0.5%, 1.5%, and 2.5%.
> + * @method: Modulation method
> + * @enable: Modulation enable or disable
> + */
> +struct clk_spread_spectrum {
> + unsigned int modfreq;
> + unsigned int spreaddepth;
> + enum clk_ssc_method method;
> + bool enable;
Do you envision a use case for having a separate enable flag?
The alternative would be to add an extra enum value above:
CLK_SSC_NO_SPREAD = 0,
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@...ux-m68k.org
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Powered by blists - more mailing lists