All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bjorn Andersson <bjorn.andersson@linaro.org>
To: Stephen Boyd <sboyd@kernel.org>
Cc: Michael Turquette <mturquette@baylibre.com>,
	linux-kernel@vger.kernel.org, linux-clk@vger.kernel.org,
	linux-arm-msm@vger.kernel.org,
	Randy Dunlap <rdunlap@infradead.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	Nathan Chancellor <natechancellor@gmail.com>,
	Stephen Rothwell <sfr@canb.auug.org.au>,
	Taniya Das <tdas@codeaurora.org>,
	"Rafael J. Wysocki" <rafael@kernel.org>
Subject: Re: [PATCH] clk: qcom: camcc-sc7180: Use runtime PM ops instead of clk ones
Date: Sat, 21 Nov 2020 22:21:12 -0600	[thread overview]
Message-ID: <20201122042112.GF95182@builder.lan> (raw)
In-Reply-To: <20201114174408.579047-1-sboyd@kernel.org>

On Sat 14 Nov 11:44 CST 2020, Stephen Boyd wrote:

> Let's call pm_runtime_get() here instead of calling the PM clk APIs
> directly. This avoids a compilation problem on CONFIG_PM=n where the
> pm_clk_runtime_{resume,suspend}() functions don't exist and covers the
> intent, i.e. enable the clks for this device so we can program PLL
> settings.
> 
> Reported-by: Randy Dunlap <rdunlap@infradead.org>
> Reported-by: Geert Uytterhoeven <geert@linux-m68k.org>
> Cc: Nathan Chancellor <natechancellor@gmail.com>
> Cc: Stephen Rothwell <sfr@canb.auug.org.au>
> Cc: Taniya Das <tdas@codeaurora.org>
> Cc: "Rafael J. Wysocki" <rafael@kernel.org>
> Fixes: 15d09e830bbc ("clk: qcom: camcc: Add camera clock controller driver for SC7180")
> Signed-off-by: Stephen Boyd <sboyd@kernel.org>

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>

Regards,
Bjorn

> ---
>  drivers/clk/qcom/camcc-sc7180.c | 12 ++++--------
>  1 file changed, 4 insertions(+), 8 deletions(-)
> 
> diff --git a/drivers/clk/qcom/camcc-sc7180.c b/drivers/clk/qcom/camcc-sc7180.c
> index f51bf5b6decc..dbac5651ab85 100644
> --- a/drivers/clk/qcom/camcc-sc7180.c
> +++ b/drivers/clk/qcom/camcc-sc7180.c
> @@ -1669,16 +1669,14 @@ static int cam_cc_sc7180_probe(struct platform_device *pdev)
>  		goto disable_pm_runtime;
>  	}
>  
> -	ret = pm_clk_runtime_resume(&pdev->dev);
> -	if (ret < 0) {
> -		dev_err(&pdev->dev, "pm runtime resume failed\n");
> +	ret = pm_runtime_get(&pdev->dev);
> +	if (ret)
>  		goto destroy_pm_clk;
> -	}
>  
>  	regmap = qcom_cc_map(pdev, &cam_cc_sc7180_desc);
>  	if (IS_ERR(regmap)) {
>  		ret = PTR_ERR(regmap);
> -		pm_clk_runtime_suspend(&pdev->dev);
> +		pm_runtime_put(&pdev->dev);
>  		goto destroy_pm_clk;
>  	}
>  
> @@ -1688,9 +1686,7 @@ static int cam_cc_sc7180_probe(struct platform_device *pdev)
>  	clk_fabia_pll_configure(&cam_cc_pll3, regmap, &cam_cc_pll3_config);
>  
>  	ret = qcom_cc_really_probe(pdev, &cam_cc_sc7180_desc, regmap);
> -
> -	pm_clk_runtime_suspend(&pdev->dev);
> -
> +	pm_runtime_put(&pdev->dev);
>  	if (ret < 0) {
>  		dev_err(&pdev->dev, "Failed to register CAM CC clocks\n");
>  		goto destroy_pm_clk;
> -- 
> https://git.kernel.org/pub/scm/linux/kernel/git/clk/linux.git/
> 

  parent reply	other threads:[~2020-11-22  4:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-11-14 17:44 [PATCH] clk: qcom: camcc-sc7180: Use runtime PM ops instead of clk ones Stephen Boyd
2020-11-14 18:30 ` Randy Dunlap
2020-11-22  4:21 ` Bjorn Andersson [this message]
2020-12-29 20:15 ` patchwork-bot+linux-arm-msm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20201122042112.GF95182@builder.lan \
    --to=bjorn.andersson@linaro.org \
    --cc=geert@linux-m68k.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=natechancellor@gmail.com \
    --cc=rafael@kernel.org \
    --cc=rdunlap@infradead.org \
    --cc=sboyd@kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=tdas@codeaurora.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.