Re: [PATCH v4 2/4] soc: qcom: ice: Add OPP-based clock scaling support for ICE

From: Krzysztof Kozlowski

Date: Wed Jan 28 2026 - 06:06:36 EST


On Wed, Jan 28, 2026 at 02:16:41PM +0530, Abhinaba Rakshit wrote:
> struct qcom_ice *engine;
> + struct dev_pm_opp *opp;
> + int err;
> + unsigned long rate;
>
> if (!qcom_scm_is_available())
> return ERR_PTR(-EPROBE_DEFER);
> @@ -584,6 +651,46 @@ static struct qcom_ice *qcom_ice_create(struct device *dev,
> if (IS_ERR(engine->core_clk))
> return ERR_CAST(engine->core_clk);
>
> + /* Register the OPP table only when ICE is described as a standalone

This is not netdev...

> + * device node. Older platforms place ICE inside the storage controller
> + * node, so they don't need an OPP table here, as they are handled in
> + * storage controller.
> + */
> + if (of_device_is_compatible(dev->of_node, "qcom,inline-crypto-engine")) {

Just add additional argument to qcom_ice_create().

> + /* OPP table is optional */
> + err = devm_pm_opp_of_add_table(dev);
> + if (err && err != -ENODEV) {
> + dev_err(dev, "Invalid OPP table in Device tree\n");
> + return ERR_PTR(err);
> + }
> + engine->has_opp = (err == 0);
> +
> + if (!engine->has_opp)
> + dev_info(dev, "ICE OPP table is not registered\n");
> + }

Best regards,
Krzysztof