Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp325504pxm; Wed, 23 Feb 2022 00:54:48 -0800 (PST) X-Google-Smtp-Source: ABdhPJwjj5C5LNTsI/MOGcdOKGmTTXcvcccHhxhYrfxVLI2GlKsft77YFRAeB6W3+vR3lsqISXLx X-Received: by 2002:a05:6402:430f:b0:410:a082:c6da with SMTP id m15-20020a056402430f00b00410a082c6damr30014583edc.438.1645606488066; Wed, 23 Feb 2022 00:54:48 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645606488; cv=none; d=google.com; s=arc-20160816; b=mnjj1O2VKxo2nSQPKgdT6hp2+FqVW3GdDkP9QH+CTFQR4l2rMctbum6H3thvS+Duty dkFsZWSeuhwsFp6DhR0MIhSk5myB7JmoGpuV2+GwbKZ9l66T5hw8ZDMHlO3M5BkJ3uVe POMEoNeNEWrWDzzcpxGcfTlreCBK/wdlDwR6sZPHhUCLlWByOmSpQbCTOJ1s5iFSqr8F G0mCWOWSart1kv8jd2dLpj056v3c8zbGNORxEwTDSm8tCpK2B3klWaZe1+2XI52LyoA5 8A1naIWHoZ5HDTqrqmvGH2xtf8cIP17f8m3zyojizTU4e7JvjNt0RK/REwJmhiuzBubH m20w== 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=E08tgNQeQ9Ef3DLQks66FyP1PMu959mkmFifh3k8TxU=; b=f6AabY6PTB8E5gsmV7tre2JQ+2WdhI5c2L/5d4vqqNJQxXWKnYZyqoy0wWnOuIS//1 1xSN5LfkQUHfjfI5KoUZ6I4BSbNa/S6wmtfeez5ZdHJKj29GNz4KGrwV3zPc+jwe5yxb P5Agi/tCw0tAclTkdYivIsKIiDhC6WVz3q6Xq8S7yhTCprrJnhpkeSqSIn5zkT2ZZdOf qbNSymCPWC8u1CTJVrrIYDtkp0cAEpvSLeKw1AFGChm4J/v/JLarfXiaOYlKR8agd+5Z /Mzru0S5Xhu4taxGSgoVVd0xRnLwSQRLtNdLWOpvOOrfSipWv9TQgnq+/7zr9KTwgilU 4y6A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@quicinc.com header.s=qcdkim header.b=OlIXnnQQ; 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 y5si11867227edp.443.2022.02.23.00.54.25; Wed, 23 Feb 2022 00:54:48 -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=OlIXnnQQ; 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 S238976AbiBWH5L (ORCPT + 99 others); Wed, 23 Feb 2022 02:57:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55204 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238953AbiBWH5G (ORCPT ); Wed, 23 Feb 2022 02:57:06 -0500 Received: from alexa-out.qualcomm.com (alexa-out.qualcomm.com [129.46.98.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53EDF5F73; Tue, 22 Feb 2022 23:56:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=quicinc.com; i=@quicinc.com; q=dns/txt; s=qcdkim; t=1645602993; x=1677138993; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version; bh=E08tgNQeQ9Ef3DLQks66FyP1PMu959mkmFifh3k8TxU=; b=OlIXnnQQyg3g1jc1gqXQ8C9RGEFidIiSutc+nYLAPLjNhvbq6iSD7gWA WJcR94jUKn3AFZaKh9l/+K9gLMU3knQcvastH/c4dT80Hm/asnyRn95px 0enyTFCPFeDdbDliOvKNIpORZjXruhDZbBXCAUMmTrmFNfGaZEfTzVcXI Y=; Received: from ironmsg09-lv.qualcomm.com ([10.47.202.153]) by alexa-out.qualcomm.com with ESMTP; 22 Feb 2022 23:56:33 -0800 X-QCInternal: smtphost Received: from nasanex01c.na.qualcomm.com ([10.47.97.222]) by ironmsg09-lv.qualcomm.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 22 Feb 2022 23:56:32 -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; Tue, 22 Feb 2022 23:56:31 -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; Tue, 22 Feb 2022 23:56:25 -0800 From: Srinivasa Rao Mandadapu To: , , , , , , , , , , , , , , , , , Linus Walleij , CC: Srinivasa Rao Mandadapu , "Venkata Prasad Potturu" Subject: [PATCH v9 7/7] pinctrl: qcom: Update clock voting as optional Date: Wed, 23 Feb 2022 13:25:32 +0530 Message-ID: <1645602932-6659-8-git-send-email-quic_srivasam@quicinc.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1645602932-6659-1-git-send-email-quic_srivasam@quicinc.com> References: <1645602932-6659-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 d67ff25..304d8a2 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 = 1, }; static const struct of_device_id lpi_pinctrl_of_match[] = { -- 2.7.4