Re: [PATCH] opp: Allow multiple clocks for primary clock operations
From: Viresh Kumar
Date: Tue Dec 01 2026 - 05:12:57 EST
On 01-12-26, 17:34, Chuan Liu via B4 Relay wrote:
> @@ -2376,24 +2376,24 @@ static int _opp_set_clknames(struct opp_table *opp_table, struct device *dev,
> opp_table->clk_count = count;
> opp_table->config_clks = config_clks;
>
> + /*
> + * We could have just dropped the "clk" field and used "clks"
> + * everywhere. Instead we kept the "clk" field around for
> + * following reasons:
> + *
> + * - avoiding clks[0] everywhere else.
> + * - not running single clk helpers for multiple clk usecase by
> + * mistake.
> + *
> + * Since some OPP helpers still rely on the primary clock, update
> + * the "clk" pointer to the first clock.
> + */
> + opp_table->clk = opp_table->clks[0];
> +
> /* Set generic single clk set here */
> if (count == 1) {
> if (!opp_table->config_clks)
> opp_table->config_clks = _opp_config_clk_single;
> -
> - /*
> - * We could have just dropped the "clk" field and used "clks"
> - * everywhere. Instead we kept the "clk" field around for
> - * following reasons:
> - *
> - * - avoiding clks[0] everywhere else.
> - * - not running single clk helpers for multiple clk usecase by
> - * mistake.
> - *
> - * Since this is single-clk case, just update the clk pointer
> - * too.
> - */
> - opp_table->clk = opp_table->clks[0];
Why is this change required ?
--
viresh