Re: [PATCH v2 11/11] soc: qcom: ice: Allow explicit votes on 'iface' clock for ICE

Harshal Dev
2026-03-16T10:59:03Z

Hi Konrad,

On 3/13/2026 5:21 PM, Konrad Dybcio wrote:
> On 3/10/26 9:06 AM, Harshal Dev wrote:
>> Since Qualcomm inline-crypto engine (ICE) is now a dedicated driver
>> de-coupled from the QCOM UFS driver, it explicitly votes for its required
>> clocks during probe. For scenarios where the 'clk_ignore_unused' flag is
>> not passed on the kernel command line, to avoid potential unclocked ICE
>> hardware register access during probe the ICE driver should additionally
>> vote on the 'iface' clock.
>> Also update the suspend and resume callbacks to handle un-voting and voting
>> on the 'iface' clock.
>>
>> Fixes: 2afbf43a4aec6 ("soc: qcom: Make the Qualcomm UFS/SDCC ICE a dedicated driver")
>> Signed-off-by: Harshal Dev <harshal.dev@oss.qualcomm.com>
>> ---
>> drivers/soc/qcom/ice.c | 11 +++++++++++
>> 1 file changed, 11 insertions(+)
>>
>> diff --git a/drivers/soc/qcom/ice.c b/drivers/soc/qcom/ice.c
>> index b203bc685cad..e05dc7b274e0 100644
>> --- a/drivers/soc/qcom/ice.c
>> +++ b/drivers/soc/qcom/ice.c
>> @@ -108,6 +108,7 @@ struct qcom_ice {
>> void __iomem *base;
>>
>> struct clk *core_clk;
>> + struct clk *iface_clk;
>> bool use_hwkm;
>> bool hwkm_init_complete;
>> u8 hwkm_version;
>> @@ -316,6 +317,13 @@ int qcom_ice_resume(struct qcom_ice *ice)
>> err);
>> return err;
>> }
>> +
>> + err = clk_prepare_enable(ice->iface_clk);
>> + if (err) {
>> + dev_err(dev, "failed to enable iface clock (%d)\n",
>> + err);
>
> dev_err(dev, "Failed to enable 'iface' clock: %d\n", err);
>
> (this line is very short, no need to wrap, also some nitty touch-ups)
>
> [...]
>

Ack.

>> + engine->iface_clk = devm_clk_get_optional_enabled(dev, "iface_clk");
>
> Check for IS_ERR, _optional won't throw an error if it's absent,
> but will if there's anything more serious that's wrong
>

Thank you for this insight, Ack.

Regards,
Harshal

> Konrad