Re: [PATCH 1/2] soc: qcom: ice: enable ICE clock scaling API
From: Konrad Dybcio
Date: Mon Oct 06 2025 - 06:15:01 EST
On 10/1/25 1:38 PM, Abhinaba Rakshit wrote:
> Add ICE clock scaling API based on the parsed clk supported
> frequencies from dt entry.
>
> Signed-off-by: Abhinaba Rakshit <abhinaba.rakshit@xxxxxxxxxxxxxxxx>
> ---
[...]
> + prop = of_get_property(dev->of_node, "freq-table-hz", &len);
> + if (!prop || len < 2 * sizeof(uint32_t)) {
> + dev_err(dev, "Freq-hz property not found or invalid length\n");
> + } else {
> + engine->min_freq = be32_to_cpu(prop[0]);
> + engine->max_freq = be32_to_cpu(prop[1]);
> + }
As I suggested in <fca8355e-9b34-4df1-a7e6-459bdad8b1ff@xxxxxxxxxxxxxxxx>,
you should really use an OPP table if you want to do any sort of clock
scaling here.
There are then nice APIs associated with that construct that won't make
you pull your hair out..
Konrad