Received: by 2002:a05:6a10:1a4d:0:0:0:0 with SMTP id nk13csp5941525pxb; Mon, 14 Feb 2022 11:14:51 -0800 (PST) X-Google-Smtp-Source: ABdhPJyY3yXeBd37atMi2x03ZyzW/N5+jJNO7RNUItX6tofuce5H/1qxjBhr77AtNJEDC2Ml6xK9 X-Received: by 2002:a17:902:db03:: with SMTP id m3mr262526plx.29.1644866091784; Mon, 14 Feb 2022 11:14:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1644866091; cv=none; d=google.com; s=arc-20160816; b=z1yDelUjVOPqapSe0z5fLQFGRKEeM8WB1q5gQUARxZA6qYfMZzZmY7SEjxSJHwAURV VfbPhp+pRxBviJTfecATnWng4dxNWZIDeuxeO4ClxLrpz1hO+PLcJWdcNJfWiMkQrVc7 Lo4YcIpgm2eIjLnnJM9TuJGiQ0vcAnTqZbWa5K5Mt8MFxvIrDijXlGYb9leusgTn1K6I ClJb4DlTOFLZtWeLgLfVYFfr4a3RkN2Xa+POBkaQeKbjlEwaXMY1IOQ6pR6ngx76VfYu SScOglRRpB2q7VZP6JtAi5xuYwng8BDMPzvHTkd+9AU3z+DmhnPFRz5mq7ou0AAUgl+B 3PDA== 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=AU3uQcQQWx80aPisgsDkLm+OSyKiTNcp/6a1avTOP4E=; b=Jx5fsWr8vKKGCtLsdatFJBgPzR7cKoUZN+LJgrq0Ug1g4DclykWQIHe/rHsDWfQtT+ K3oILsVx6HBuqOAq1hMOHVOjmEBnJZWEj2D7omnvFoKdPS/kF0HRiD7mKnZR28U+7eVg XvJGHb4FznbM4nT1FSxeBAOIj00nN91GGoSP6/Gzi6kdb1gtkhPtiQSkUFfimyFyJM1/ MIPJfHWCPkLg4oWTEf/5Ikh0CMUPX2RWij9nU0pt8VrPHb1IY3BvAdpFOS5FbUSyrdM/ AxU/35AfjNN5msEPhAEcpPVJ2RmmUGzK2i61bvu5MkJ7d/ZjrhBSmK6ovOgxA51BbdSB v8IA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=TpejtfHt; 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 e190si461347pgc.779.2022.02.14.11.14.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 14 Feb 2022 11:14:51 -0800 (PST) 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=TpejtfHt; 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 387519FD9; Mon, 14 Feb 2022 11:07:42 -0800 (PST) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355817AbiBNPVd (ORCPT + 99 others); Mon, 14 Feb 2022 10:21:33 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:47400 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1355824AbiBNPVP (ORCPT ); Mon, 14 Feb 2022 10:21:15 -0500 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C00A5FF17; Mon, 14 Feb 2022 07:21:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1644852067; x=1676388067; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=AU3uQcQQWx80aPisgsDkLm+OSyKiTNcp/6a1avTOP4E=; b=TpejtfHtjiM4LrMLq4zdJqPoOL546wZOLYPTorQ1sRiM70scKx/5eK/L CEVFx5e7qcjC3MUhfogT0JLnhL82LA7yAHSCVr7X7iHqlXRVAid8fsStw w+GY5SYAGiFDQkXHR4yFarkBxC5Ypcn3e8hUT4sP3qIMEjRXER2Y44M6/ g=; Received: from ironmsg08-lv.qualcomm.com ([10.47.202.152]) by alexa-out.qualcomm.com with ESMTP; 14 Feb 2022 07:21:04 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg08-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 14 Feb 2022 07:21:03 -0800 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.15; Mon, 14 Feb 2022 07:21:02 -0800 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.922.19; Mon, 14 Feb 2022 07:20:55 -0800 From: Srinivasa Rao Mandadapu To: , , , , , , , , , , , , , , , , , Linus Walleij , CC: Srinivasa Rao Mandadapu , "Venkata Prasad Potturu" Subject: [PATCH v6 7/7] pinctrl: qcom: Update clock voting as optional Date: Mon, 14 Feb 2022 20:49:54 +0530 Message-ID: <1644851994-22732-8-git-send-email-quic_srivasam@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1644851994-22732-1-git-send-email-quic_srivasam@quicinc.com> References: <1644851994-22732-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, these are maintained as power domains and operated from lpass audio core cc. 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 | 16 +++++++++------- drivers/pinctrl/qcom/pinctrl-lpass-lpi.h | 1 + drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c | 1 + 3 files changed, 11 insertions(+), 7 deletions(-) diff --git a/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c b/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c index 8a82fd9..103f0a6c 100644 --- a/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c +++ b/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c @@ -407,13 +407,15 @@ 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 (ret) - return dev_err_probe(dev, ret, "Can't get clocks\n"); - - ret = clk_bulk_prepare_enable(MAX_LPI_NUM_CLKS, pctrl->clks); - if (ret) - return dev_err_probe(dev, ret, "Can't enable clocks\n"); + if (!data->is_clk_optional) { + 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"); + + ret = clk_bulk_prepare_enable(MAX_LPI_NUM_CLKS, pctrl->clks); + if (ret) + return dev_err_probe(dev, ret, "Can't enable clocks\n"); + } pctrl->desc.pctlops = &lpi_gpio_pinctrl_ops; pctrl->desc.pmxops = &lpi_gpio_pinmux_ops; diff --git a/drivers/pinctrl/qcom/pinctrl-lpass-lpi.h b/drivers/pinctrl/qcom/pinctrl-lpass-lpi.h index a511d72..c1079bf 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; + int 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 5bf30d97..4277e31 100644 --- a/drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c +++ b/drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c @@ -143,6 +143,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 = 1, }; static const struct of_device_id lpi_pinctrl_of_match[] = { -- 2.7.4