From patchwork Thu Feb 16 13:14:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladimir Zapolskiy X-Patchwork-Id: 654591 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 7B764C6FD1B for ; Thu, 16 Feb 2023 13:15:41 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230235AbjBPNPK (ORCPT ); Thu, 16 Feb 2023 08:15:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56944 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230314AbjBPNOu (ORCPT ); Thu, 16 Feb 2023 08:14:50 -0500 Received: from mail-lj1-x236.google.com (mail-lj1-x236.google.com [IPv6:2a00:1450:4864:20::236]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F17DF5454A for ; Thu, 16 Feb 2023 05:14:45 -0800 (PST) Received: by mail-lj1-x236.google.com with SMTP id a13so1885512ljq.6 for ; Thu, 16 Feb 2023 05:14:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1676553285; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=drQma7nNWgYIegGN8xjgb6Jv9bqzaE0wjeikGVtXijQ=; b=FDyBsCyO20brAo9mArK9sLpKTcfWTBO6lkQ3Yhr3vKaFRh7X8VpRii5YD/dln9157Z oZwUTwCwWZ9SKKDfU2ny6zyEXZSUSyKQZwOJAm9/jheDgWsZvJLBgxNoKVOMZMv1VPus F6a1RhDwbG23H7cN6ToOHVb+k/18K3OjlTHDDEvbY3eaDd2U7nZy3jpGav5FHc3fG2WD uozmLlxxkCshEfDabs7uth+OvXysjEXFOQC9RZ96fKIwb9bNSwAGrc206vr2ME8ENGIX BfjQ3PffZFduWDryHO4nGax/gDezfYGiG50J+jYLda+5pvysXUjZZCh5AfY9+CjrXKYU iH8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1676553285; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=drQma7nNWgYIegGN8xjgb6Jv9bqzaE0wjeikGVtXijQ=; b=qW1XuD3FcMJl9Rfn546WRQNB66N45LgEtK9oI/aFPdBfZrMO0ACYvg6uBNClKk+2gj MWVs5aOrm2pmdjRgkY2WmtGVd2AVOYKpxfHeAFzeB+2mJN68gYnfTDt4Bxg5W11+1E3l jwd9YTua6OZHH+SL86Bu8GL8yN0Hn5tqptvoci5K4WiPnq493VWmolWxo4h8duZKwhvO yewJxUiNu7sJqUYClst4x6aMN84qoFnU0wMi0k8zXFfL/CN7k+5MBPVpANocsFf+BLDi HqtF+gfbe/xKmi9nsneNFoRXl/6AUNvv9nevdZon0DFU0U1Y+4bPDSP6HudK6nmUoqJF aVhQ== X-Gm-Message-State: AO0yUKX9p8uQ0+grzAwRx41YGyG4a+A3XtBdy8ZjhC1gCQDi2TaZB5qN zsHqKecM+TkgMUWFfO6/XI6SCg== X-Google-Smtp-Source: AK7set/KKe9iXZAkK+yWzAUyqQqZOENyMPekg2hCaKYdm3gVnxuJhHxy5l5i0oL15TDFFzOk8pBsvA== X-Received: by 2002:a2e:9913:0:b0:293:4eac:734a with SMTP id v19-20020a2e9913000000b002934eac734amr1593442lji.0.1676553285510; Thu, 16 Feb 2023 05:14:45 -0800 (PST) Received: from localhost.localdomain (88-112-131-206.elisa-laajakaista.fi. [88.112.131.206]) by smtp.gmail.com with ESMTPSA id j8-20020a2e8248000000b00293500280e5sm194345ljh.111.2023.02.16.05.14.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Feb 2023 05:14:44 -0800 (PST) From: Vladimir Zapolskiy To: Krzysztof Kozlowski , Bjorn Andersson , Herbert Xu , Thara Gopinath , Bhupesh Sharma Cc: Rob Herring , Konrad Dybcio , Andy Gross , "David S. Miller" , devicetree@vger.kernel.org, linux-arm-msm@vger.kernel.org, linux-crypto@vger.kernel.org, Jordan Crouse Subject: [PATCH v10 09/10] crypto: qce: core: Make clocks optional Date: Thu, 16 Feb 2023 15:14:29 +0200 Message-Id: <20230216131430.3107308-10-vladimir.zapolskiy@linaro.org> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20230216131430.3107308-1-vladimir.zapolskiy@linaro.org> References: <20230216131430.3107308-1-vladimir.zapolskiy@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Thara Gopinath 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 --- drivers/crypto/qce/core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/qce/core.c b/drivers/crypto/qce/core.c index 0654b94cfb95..5bb2128c95ca 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);