Received: by 2002:a05:6a10:413:0:0:0:0 with SMTP id 19csp992075pxp; Wed, 16 Mar 2022 23:44:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwkDerE5CndF6F3aZge23EYAKPc0OIgp1DVKQlSJ/H5Z1KDbeLk33YT5RmFLDZrLMi0Iuql X-Received: by 2002:a63:2003:0:b0:381:2dd3:ab4b with SMTP id g3-20020a632003000000b003812dd3ab4bmr2559660pgg.517.1647499461094; Wed, 16 Mar 2022 23:44:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1647499461; cv=none; d=google.com; s=arc-20160816; b=wMsm9oYVgcTBIvEwE6UvzlAawOOxwXVPLzC8islwM0G2viGJ4WUDDYb8kgvJ2sk6UU WWVXXDRt4l0nnKm5MmJvMu9ARKqVxtSolYTM8+W3xAWx5vETqESQFT1aiZIOytlQgDAU Ssid6iXzPWIOyhsVCe6BMBqyyo4TAgWCWfmYVpebj9wr5TFrqCCqNGNPwjlKgjo3W3lz hxz2HU8BV9EZ9zDTEQfnwyYcTDPCmvvJAkGPGjNqbSJJnvRniUnkR2cz07U7AxhJH6Jq Dy5WonkNsJBYPuEWbQxswfvqaRTkEBB+uFDFuNRluVDvfwo080V20IzGeSmPz5SdCtLR T4kw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=P09KFJBhosL0gRzmWoJn0ZVYvPQeqeJkftNXKvDXo3Q=; b=QwhYzgokw4ecB8+QG7vKcw1WCNcHTx84xm3hLRNS+y7I/ZoPDszNlLQq0pLESkfhEq MAUy+cGA5M5W7X7RoGrfmW338cNfPJfY+YY5yYRnk6C0nmUutstobjBeEM6FJw4JYz0C 4HyALOmi6OwZ47jwf2WnE4YIpHqmyaRxIVKvSLITKH8UtGZrPgYjtTtgbYyHCifQl9kG 0mimXoJrXbarSvaRhTvms/ubbcUIH8cBCVD25dZYqxI1ssqCS9eUvErTWmd4abqaiVvy IGC7DV8tXekEb6Bo372/NLPQ43mBb2ZK1n4yl8BRJ3sTh6XSg82Dv9kpvA6Ho5eGI26O 7usw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b="Gpi2kGv/"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id y5-20020a656c05000000b0038211111ec0si230043pgu.197.2022.03.16.23.44.20 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 16 Mar 2022 23:44:21 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b="Gpi2kGv/"; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 407BD2D4E98; Wed, 16 Mar 2022 22:29:10 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1357486AbiCPQTz (ORCPT + 99 others); Wed, 16 Mar 2022 12:19:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1357483AbiCPQTu (ORCPT ); Wed, 16 Mar 2022 12:19:50 -0400 Received: from alexa-out-sd-02.qualcomm.com (alexa-out-sd-02.qualcomm.com [199.106.114.39]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EBE072A730; Wed, 16 Mar 2022 09:18:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1647447507; x=1678983507; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=P09KFJBhosL0gRzmWoJn0ZVYvPQeqeJkftNXKvDXo3Q=; b=Gpi2kGv/3tvNjzkvLQvCDw0lSSFy123VHOaO31UN+UjFh0CNrru+x5cP Af2tr+kQc4rHpykua2n6w/TI5z4Fq3JVGbaFog0Q5t0EL3i3pEROYC2qp mnlQqz20YIBSFWDIS24h5OPJJHsh4DNvumA4kzZOOuKdxECCBg2O296f2 8=; Received: from unknown (HELO ironmsg02-sd.qualcomm.com) ([10.53.140.142]) by alexa-out-sd-02.qualcomm.com with ESMTP; 16 Mar 2022 09:18:27 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg02-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 16 Mar 2022 09:18:26 -0700 Received: from nalasex01a.na.qualcomm.com (10.47.209.196) by nasanex01c.na.qualcomm.com (10.47.97.222) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Wed, 16 Mar 2022 09:18:26 -0700 Received: from hu-srivasam-hyd.qualcomm.com (10.80.80.8) by nalasex01a.na.qualcomm.com (10.47.209.196) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.986.22; Wed, 16 Mar 2022 09:18:19 -0700 From: Srinivasa Rao Mandadapu To: , , , , , , , , , , , , , , , , , Linus Walleij , CC: Srinivasa Rao Mandadapu , "Venkata Prasad Potturu" Subject: [PATCH v12 7/7] pinctrl: qcom: Update clock voting as optional Date: Wed, 16 Mar 2022 21:47:06 +0530 Message-ID: <1647447426-23425-8-git-send-email-quic_srivasam@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1647447426-23425-1-git-send-email-quic_srivasam@quicinc.com> References: <1647447426-23425-1-git-send-email-quic_srivasam@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [10.80.80.8] X-ClientProxiedBy: nasanex01b.na.qualcomm.com (10.46.141.250) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Update bulk clock voting to optional voting as ADSP bypass platform doesn't need macro and decodec clocks, as these macro and dcodec GDSC switches are maintained as power domains and operated from lpass clock drivers. Signed-off-by: Srinivasa Rao Mandadapu Co-developed-by: Venkata Prasad Potturu Signed-off-by: Venkata Prasad Potturu --- drivers/pinctrl/qcom/pinctrl-lpass-lpi.c | 8 ++++++-- drivers/pinctrl/qcom/pinctrl-lpass-lpi.h | 1 + drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c | 1 + 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c b/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c index 717e937..74810ec 100644 --- a/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c +++ b/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c @@ -401,9 +401,13 @@ int lpi_pinctrl_probe(struct platform_device *pdev) return dev_err_probe(dev, PTR_ERR(pctrl->slew_base), "Slew resource not provided\n"); - ret = devm_clk_bulk_get(dev, MAX_LPI_NUM_CLKS, pctrl->clks); + if (data->is_clk_optional) + ret = devm_clk_bulk_get_optional(dev, MAX_LPI_NUM_CLKS, pctrl->clks); + else + ret = devm_clk_bulk_get(dev, MAX_LPI_NUM_CLKS, pctrl->clks); + if (ret) - return dev_err_probe(dev, ret, "Can't get clocks\n"); + return ret; ret = clk_bulk_prepare_enable(MAX_LPI_NUM_CLKS, pctrl->clks); if (ret) diff --git a/drivers/pinctrl/qcom/pinctrl-lpass-lpi.h b/drivers/pinctrl/qcom/pinctrl-lpass-lpi.h index afbac2a..759d5d8 100644 --- a/drivers/pinctrl/qcom/pinctrl-lpass-lpi.h +++ b/drivers/pinctrl/qcom/pinctrl-lpass-lpi.h @@ -77,6 +77,7 @@ struct lpi_pinctrl_variant_data { int ngroups; const struct lpi_function *functions; int nfunctions; + bool is_clk_optional; }; int lpi_pinctrl_probe(struct platform_device *pdev); diff --git a/drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c b/drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c index d67ff25..97a653c 100644 --- a/drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c +++ b/drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c @@ -142,6 +142,7 @@ static const struct lpi_pinctrl_variant_data sc7280_lpi_data = { .ngroups = ARRAY_SIZE(sc7280_groups), .functions = sc7280_functions, .nfunctions = ARRAY_SIZE(sc7280_functions), + .is_clk_optional = true, }; static const struct of_device_id lpi_pinctrl_of_match[] = { -- 2.7.4