Received: by 2002:a05:6a10:7420:0:0:0:0 with SMTP id hk32csp4370288pxb; Mon, 21 Feb 2022 19:22:05 -0800 (PST) X-Google-Smtp-Source: ABdhPJwT4XyFydCcNrpMXPy//8tgfkGhb9nwM6nw2gCdOzxu1Or2gGs47OXVuGx9XNLpC323pXVK X-Received: by 2002:a05:6402:55:b0:413:2822:2928 with SMTP id f21-20020a056402005500b0041328222928mr84270edu.174.1645500124757; Mon, 21 Feb 2022 19:22:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645500124; cv=none; d=google.com; s=arc-20160816; b=vSgqj6ekgR9UKIa/uEJ+WFsIQpdjUBug+nw62dCOQaw9yA+kw9BBMQdCB8xCQTXNra ohzAsoOQyCL8z1pE/7aFTdnVtMmfC5K4KZdP5QLiVzM29UsmR36eh4ekuXqHex3ZKymq fOZ42GhRcxJysddGUY+AgAiMg918UnkSVlsbXtf0VlHhaSPrWMY+vs8UefWIp3EFh8k2 PM4WrJafwTLDoqeVt4EreHa1vLNnytg8wluqOBJ7+vbVCeCN/QgVs3zfxy/NsjvMxvBG 5Pl76kA4AOEFZxTU6evZkCz4N9VE9kYa4an3V6zxjveadLn7z8BlWWjWtcOOlhqf9hcF M51w== 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=YJFEWw3u7nZsGoCh80cKdIOELGtHf9MeYkSboNBfGd0=; b=0Niq4RDDUWLaA169zIiVMaqp8RxaxNbFxcB44VpLQL76YrJQRjzNPFehNyc2BILFmw yVeCph9uD4vOZUrPtQg901p7/9K8XXcZmfIoYji7PbtFQnFmvqpPSNNjWDvHH5z1bRk4 LLU0PQpvO8hW+QWAi5rqfthvMI3iudJaBeslfXIkUpHnWi3y7VlZuZMEKWQvsyC9P7Ut iloc1UGbmtcdePdoYI6lyyR9afwcyfC7MQY/MpEfsIeWJNtx6+8H4fG5auWJCwlt2qvK FCzPv/zr7YA/vTlwS8y7bMdlH8VYnO+mqC6FNhYMNU+Z0AyzDP15JY2GPM0Z6Utf7Rik HyEA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=RRXBjYfH; 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 t19si5189315ejc.940.2022.02.21.19.21.42; Mon, 21 Feb 2022 19:22:04 -0800 (PST) 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=RRXBjYfH; 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 S1378697AbiBUPBS (ORCPT + 99 others); Mon, 21 Feb 2022 10:01:18 -0500 Received: from mxb-00190b01.gslb.pphosted.com ([23.128.96.19]:59434 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1378719AbiBUPAw (ORCPT ); Mon, 21 Feb 2022 10:00:52 -0500 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 7FC0B22524; Mon, 21 Feb 2022 07:00:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1645455625; x=1676991625; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=YJFEWw3u7nZsGoCh80cKdIOELGtHf9MeYkSboNBfGd0=; b=RRXBjYfHCBJ4Bcqe2vumoCDL92mSdvC9yTPASTIya3zRgYw9UKZ1Z4WY Sw8eoyR3VqhcEwYpSzdrm0dH/zCdr16cyUtniC6NDg1ZLhndKgviFvazF Lcp9Fub3Hb7O51O7PJcyb7zfK6tb8LChviABGO7FcB+haMDZxrDw9+rKY w=; Received: from unknown (HELO ironmsg04-sd.qualcomm.com) ([10.53.140.144]) by alexa-out-sd-01.qualcomm.com with ESMTP; 21 Feb 2022 07:00:25 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg04-sd.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 21 Feb 2022 07:00:24 -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, 21 Feb 2022 07:00:22 -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.986.15; Mon, 21 Feb 2022 07:00:16 -0800 From: Srinivasa Rao Mandadapu To: , , , , , , , , , , , , , , , , , Linus Walleij , CC: Srinivasa Rao Mandadapu , "Venkata Prasad Potturu" Subject: [PATCH v8 7/7] pinctrl: qcom: Update clock voting as optional Date: Mon, 21 Feb 2022 20:29:14 +0530 Message-ID: <1645455554-22370-8-git-send-email-quic_srivasam@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1645455554-22370-1-git-send-email-quic_srivasam@quicinc.com> References: <1645455554-22370-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=-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, 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 | 12 +++++++++--- drivers/pinctrl/qcom/pinctrl-lpass-lpi.h | 1 + drivers/pinctrl/qcom/pinctrl-sc7280-lpass-lpi.c | 1 + 3 files changed, 11 insertions(+), 3 deletions(-) diff --git a/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c b/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c index 1ab572f..c618b74 100644 --- a/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c +++ b/drivers/pinctrl/qcom/pinctrl-lpass-lpi.c @@ -407,9 +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"); + if (data->is_clk_optional) { + ret = devm_clk_bulk_get_optional(dev, MAX_LPI_NUM_CLKS, pctrl->clks); + if (ret) + return dev_err_probe(dev, ret, "Can't get clocks\n"); + } 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"); + } 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..3bcede6 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 3aa4dd38..7332c31 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