Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp4350935pxb; Wed, 20 Apr 2022 00:56:32 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzZH93pv2+vPFwRh0eQMSkiGYu/wDOTiiTJ4ec34Rk9esVd/UUrxgeyzCz50b/PNkXuP8+p X-Received: by 2002:a17:902:d08b:b0:158:d36a:e906 with SMTP id v11-20020a170902d08b00b00158d36ae906mr19431453plv.20.1650441392234; Wed, 20 Apr 2022 00:56:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650441392; cv=none; d=google.com; s=arc-20160816; b=OaFWxbefDxf92PrKiPCGsEk3a66ImTdRfK3f0SC8f0pn67waiIBDpW5/7v1BmpKdQH Gs/6faKCx2hlRm1i8BBFNpiD/HeqQux9j8ErVyNoatB3b/J/0EsDDaV0XTRQcgTObW9Y cqTAC3uYL4uAN6vlee/esINlB/tsxS0Qaef429IZRy/C7Ylqr36N9sI9vcuVUxMBzz9X qhv3pvQ9PkS39g0HMcBrp0GD2gdoPYI8rSNGLbJ+Sn35Pa0a9S7VrIWP0RlR4ZuMR9c6 R7Py6zdAVUvhHvjyQ3vxSTiiioFHNW2X4HlE9UXLjK8c3k+ckgIb1KlGArgb8mkbkeoU 5ovQ== 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=A0LmYC/gEqsIU27Z6oRulOsy/d8igGAqb2T/BGD0plE=; b=MN7nDwql9QlkjnyJomwViQP0j8ZO4O1N9o0IsfSMgPRD7i8lI2xIzCEFcDZ5LlTlMT tIBbsOO4taUbjmjXKgG1mXaFUNvN/EXpayJU3dHhy7OafNVRVPO+yZbbyQI2tSKgIUUQ 5e/aE3G2XLz/kYWgYYNPq3Hhl0VVuSmI/72WDfJ6sAUJhCNqK2FJGdJrKYKcKYuNZtN2 ptjwXxLyDLgKp1jspDaSLB741T1fg2fwiYfyMuxKFDrk2q2GUkvDre8H/okKn+2hqPQq pn3gjCIgL9L8Srd+58cds5qOkOk57zWVU/aWahpFPJ4uERQV0Vrv1irixFqmGLK7Fx0r uuyQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=OsVc0p4G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 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 out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lb16-20020a17090b4a5000b001cb162f9372si4667987pjb.62.2022.04.20.00.56.17; Wed, 20 Apr 2022 00:56:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=OsVc0p4G; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=quicinc.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242881AbiDRNJk (ORCPT + 99 others); Mon, 18 Apr 2022 09:09:40 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59866 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240919AbiDRM6E (ORCPT ); Mon, 18 Apr 2022 08:58:04 -0400 Received: from alexa-out-sd-01.qualcomm.com (alexa-out-sd-01.qualcomm.com [199.106.114.38]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C70423BC8; Mon, 18 Apr 2022 05:38:20 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1650285501; x=1681821501; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=A0LmYC/gEqsIU27Z6oRulOsy/d8igGAqb2T/BGD0plE=; b=OsVc0p4GbndBJ4+fp5yQ06BmjWyX1RDGURFpu1VhH1fOkgIgLgHtq1az 8E7zdiKXmgg0f9H6no6RYw65wC16yVRAi9BLX0zokytgHYgvNX8aXPxyy 6Z7O2I7NxyIskM9uT9dpU474I4WsI5dfpb0wLCUltA0SCJ49oVpVQeSnH c=; Received: from unknown (HELO ironmsg05-sd.qualcomm.com) ([10.53.140.145]) by alexa-out-sd-01.qualcomm.com with ESMTP; 18 Apr 2022 05:38:20 -0700 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg05-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 18 Apr 2022 05:38:20 -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; Mon, 18 Apr 2022 05:38:19 -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; Mon, 18 Apr 2022 05:38:12 -0700 From: Srinivasa Rao Mandadapu To: , , , , , , , , , , , , , , , , , Linus Walleij , CC: Srinivasa Rao Mandadapu , "Venkata Prasad Potturu" Subject: [PATCH v13 7/7] pinctrl: qcom: Update clock voting as optional Date: Mon, 18 Apr 2022 18:07:07 +0530 Message-ID: <1650285427-19752-8-git-send-email-quic_srivasam@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1650285427-19752-1-git-send-email-quic_srivasam@quicinc.com> References: <1650285427-19752-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: nasanex01a.na.qualcomm.com (10.52.223.231) To nalasex01a.na.qualcomm.com (10.47.209.196) X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 Reviewed-by: Matthias Kaehlcke --- 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 d615b6c5..2add9a4 100644 --- a/drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c +++ b/drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c @@ -141,6 +141,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