From patchwork Mon May 29 13:14:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Konrad Dybcio X-Patchwork-Id: 100258 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp1508879vqr; Mon, 29 May 2023 06:20:39 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ6R02ocrlCXOR+AkMs9YwbuvLnticG6uH+j5x4xa3xzuZD6Tbje2EaIzBo8FfAmzHEzog/P X-Received: by 2002:a17:902:a710:b0:19f:3d59:e0ac with SMTP id w16-20020a170902a71000b0019f3d59e0acmr9657839plq.44.1685366439371; Mon, 29 May 2023 06:20:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685366439; cv=none; d=google.com; s=arc-20160816; b=s6zyg27Q5x6VVi0nCzVXR4H5Wcpimp/HuMtXW/06XFXBiX4QQ0rny9e+muCrpYtrU4 QheBmyCFQ+CCQTyU860ZECjit1p7Uz/40nRMEb9GSSHe78Ke+Sj7Tt61+KspvvPIS3Nu pb71AyW2amvFgkuNe3SP3cPIozBYgoSxqgtdX2JsQq71U2VJ+6k1ZuWH9leEOJN7odeT X+0B7hItl1CDY0StKVx6txl9VXFd9t/0C4SvwJSbKqwAyVmJ4ygqO1D2lG1kcjecbPWH RmPLqlTtFWXK35znDpn3XOwGiQo1MFMrGTYjICXsPRvsOtL2DnTt58DS0mx8EBZGadEh csqA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=x278P3+nKSRirib6kE+simYSKscVONKkDYY89zSUJwA=; b=STSeq2PuHCsPKjytGnbiO+LUpzZKzY2AJ5iLpTf+4GFCv5E8Xki8ivmLjpC/pAZv7e 5VwDRUBJjHoA7l0/iUC4HhOF/k6iuRbGfhOorewBvxdWOGVoCJdNN44QpSQUx50SdWAU j809nrm8kUNBwZPcfyMkC6Jo3jP+2d32ODXN7fJt1CfaTZAEdT2I3M/iNOzjK2UQVIah +quFiYzWDRKCoR9nM8eTQJL1TzDA5sMMKhObEaG72/HwL65hAqnWFN/aulzx95/p3q5d Q1DSmgFBWSF1Hhx8mQ3+3npm7krIiYZy1kPXGETXnPh7OpT7d8aNb0SFsZEldCPYyj8k u8PA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vyonl+av; 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=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g18-20020a170902869200b001ab18d794a5si9200703plo.297.2023.05.29.06.20.25; Mon, 29 May 2023 06:20:39 -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=@linaro.org header.s=google header.b=vyonl+av; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229720AbjE2NOi (ORCPT + 99 others); Mon, 29 May 2023 09:14:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41364 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229688AbjE2NOb (ORCPT ); Mon, 29 May 2023 09:14:31 -0400 Received: from mail-lf1-x129.google.com (mail-lf1-x129.google.com [IPv6:2a00:1450:4864:20::129]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B387B7 for ; Mon, 29 May 2023 06:14:30 -0700 (PDT) Received: by mail-lf1-x129.google.com with SMTP id 2adb3069b0e04-4f3a99b9177so3673482e87.1 for ; Mon, 29 May 2023 06:14:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1685366068; x=1687958068; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=x278P3+nKSRirib6kE+simYSKscVONKkDYY89zSUJwA=; b=vyonl+avaXtFvjnis6oaTqyYS0tNt8GzEjV5F5AK4Rtot4JdsLwHp6SxMccKaPEwPx phkJi5bJslMRnpya6lGi0SCAmbUIrd8VfJbyytmhuC5+7aVfJvuckrk4RDKS2jNJVxWz 7XofMe3aBUE0WueGz0YLm7zT7QlxhmmhA8Ys82+nUrUaHiZSCcp02C0+IQxaOBkg5Fmf 9hIf8KBMKpAON+soDrqQ4KYUjdpYv5h8Yd1iWZs0AJ9W3AK1XXbexXvYzzcZ/oO1cgwC g8yZdfsSn3kYBAV6UGVymVGWkabKMWfEejysAEZaNowFQMDj+U1J4Z/yITsiJasQ3q3Q RqtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685366068; x=1687958068; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=x278P3+nKSRirib6kE+simYSKscVONKkDYY89zSUJwA=; b=Wu/vCTw+oSQve7DdVHDniDQOYlGRvip3mPShxKTzKXxu2UroJjZHvWdMs5aTcCdwIq c7DY5IpJE20LAh9hj/ed3rqzCwIuBmbj1FzmslggUe339Zv5+J8Db8XrPiYmYA49DcVf x7Kist5Mektr/FXTZ/gILgpbE7srn9hfC7pFjoRvBIqwTjSL1ad3fqSDvHS4Wp4NXDf/ zOrnySM8oB4b/5tktmzse5i2xz0MRqmRg6bfhyrYcUYexEkXhrfvHFbcRBCC12I7cN22 R5SGM8vtITq791UgTWaByd9Dwo73RzxNS1ahphKylNyDSjS49lYxRI0987muqxtzqmH5 kpFA== X-Gm-Message-State: AC+VfDx+pmTlvqvj2r2hKd0pJxcEunhfkOoMxzC9lJscBsJlmsjL1KBp 7cC0IVKKJ0UawpxBFAqIKZXmIl/MbUDINU0C8pc= X-Received: by 2002:ac2:4425:0:b0:4f2:7cb1:65fc with SMTP id w5-20020ac24425000000b004f27cb165fcmr3352598lfl.64.1685366067830; Mon, 29 May 2023 06:14:27 -0700 (PDT) Received: from [192.168.1.101] (abyj77.neoplus.adsl.tpnet.pl. [83.9.29.77]) by smtp.gmail.com with ESMTPSA id b30-20020ac25e9e000000b004eff4f67f1csm1966375lfq.304.2023.05.29.06.14.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 29 May 2023 06:14:27 -0700 (PDT) From: Konrad Dybcio Date: Mon, 29 May 2023 15:14:24 +0200 Subject: [PATCH 2/2] clk: qcom: gpucc-sm6375: Enable runtime pm MIME-Version: 1.0 Message-Id: <20230529-topic-sm6375gpuccpd-v1-2-8d57c41a6066@linaro.org> References: <20230529-topic-sm6375gpuccpd-v1-0-8d57c41a6066@linaro.org> In-Reply-To: <20230529-topic-sm6375gpuccpd-v1-0-8d57c41a6066@linaro.org> To: Andy Gross , Bjorn Andersson , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Marijn Suijten , linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Konrad Dybcio X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1685366063; l=1703; i=konrad.dybcio@linaro.org; s=20230215; h=from:subject:message-id; bh=FCWtznh8qKMCk7aGI9UAflx31G2nB1pwP25Cm0GDLGM=; b=TIzzdGVj/33FhZbVZwxfJzULE98ho9j5EP0ObW6OgbnLYs/W032xyG2b6VnlD4zyfMypgxTdh 3f28AKawd+1DPldnYJmP4wKIVgSVzDq86t7OOShQ8BndH8/OWYEIDV9 X-Developer-Key: i=konrad.dybcio@linaro.org; a=ed25519; pk=iclgkYvtl2w05SSXO5EjjSYlhFKsJ+5OSZBjOkQuEms= X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767234799161230488?= X-GMAIL-MSGID: =?utf-8?q?1767234799161230488?= The GPUCC block on SM6375 is powered by VDD_CX and VDD_GX. If the latter rail is not online, GX_GDSC will never turn on. Enable runtime pm so that we can reference VDD_GX from the dt to ensure that. Signed-off-by: Konrad Dybcio --- drivers/clk/qcom/gpucc-sm6375.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) diff --git a/drivers/clk/qcom/gpucc-sm6375.c b/drivers/clk/qcom/gpucc-sm6375.c index d3620344a009..2d863dc3d83b 100644 --- a/drivers/clk/qcom/gpucc-sm6375.c +++ b/drivers/clk/qcom/gpucc-sm6375.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -434,15 +435,29 @@ MODULE_DEVICE_TABLE(of, gpucc_sm6375_match_table); static int gpucc_sm6375_probe(struct platform_device *pdev) { struct regmap *regmap; + int ret; + + ret = devm_pm_runtime_enable(&pdev->dev); + if (ret) + return ret; + + ret = pm_runtime_resume_and_get(&pdev->dev); + if (ret) + return ret; regmap = qcom_cc_map(pdev, &gpucc_sm6375_desc); - if (IS_ERR(regmap)) + if (IS_ERR(regmap)) { + pm_runtime_put(&pdev->dev); return PTR_ERR(regmap); + } clk_lucid_pll_configure(&gpucc_pll0, regmap, &gpucc_pll0_config); clk_lucid_pll_configure(&gpucc_pll1, regmap, &gpucc_pll1_config); - return qcom_cc_really_probe(pdev, &gpucc_sm6375_desc, regmap); + ret = qcom_cc_really_probe(pdev, &gpucc_sm6375_desc, regmap); + pm_runtime_put(&pdev->dev); + + return ret; } static struct platform_driver gpucc_sm6375_driver = {