From: Thara Gopinath Date: Wed, 22 Feb 2023 17:22:39 +0000 (+0200) Subject: crypto: qce - Make clocks optional X-Git-Tag: v6.6.17~4781^2~107 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=167af1f338f55250e0c4792f53b02cd761765228;p=platform%2Fkernel%2Flinux-rpi.git crypto: qce - Make clocks optional On certain Snapdragon processors, the crypto engine clocks are enabled by default by security firmware and the driver should not handle the clocks. Make acquiring of all the clocks optional in crypto engine driver, so that the driver initializes properly even if no clocks are specified in the dt. Tested-by: Jordan Crouse Signed-off-by: Thara Gopinath Signed-off-by: Bhupesh Sharma [Bhupesh: Massage the commit log] Signed-off-by: Vladimir Zapolskiy Signed-off-by: Herbert Xu --- diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c index 0654b94..5bb2128 100644 --- a/drivers/crypto/qce/core.c +++ b/drivers/crypto/qce/core.c @@ -209,15 +209,15 @@ static int qce_crypto_probe(struct platform_device *pdev) if (ret < 0) return ret; - qce->core = devm_clk_get(qce->dev, "core"); + qce->core = devm_clk_get_optional(qce->dev, "core"); if (IS_ERR(qce->core)) return PTR_ERR(qce->core); - qce->iface = devm_clk_get(qce->dev, "iface"); + qce->iface = devm_clk_get_optional(qce->dev, "iface"); if (IS_ERR(qce->iface)) return PTR_ERR(qce->iface); - qce->bus = devm_clk_get(qce->dev, "bus"); + qce->bus = devm_clk_get_optional(qce->dev, "bus"); if (IS_ERR(qce->bus)) return PTR_ERR(qce->bus);