[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9710258c-3419-41f2-9b30-f818b031ae5f@linaro.org>
Date: Wed, 22 Nov 2023 21:01:58 +0100
From: Konrad Dybcio <konrad.dybcio@...aro.org>
To: Satya Priya Kakitapalli <quic_skakitap@...cinc.com>,
Andy Gross <agross@...nel.org>,
Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>
Cc: linux-arm-msm@...r.kernel.org, linux-clk@...r.kernel.org,
linux-kernel@...r.kernel.org, devicetree@...r.kernel.org,
Bjorn Andersson <andersson@...nel.org>,
Bryan O'Donoghue <bryan.odonoghue@...aro.org>
Subject: Re: [PATCH V2 4/4] clk: qcom: videocc-sm8150: Add runtime PM support
On 11/18/23 13:39, Satya Priya Kakitapalli wrote:
> Add runtime PM support to ensure the supply rails are enabled
> when necessary.
>
> Signed-off-by: Satya Priya Kakitapalli <quic_skakitap@...cinc.com>
> ---
> Changes since v1:
> - None.
>
> drivers/clk/qcom/videocc-sm8150.c | 20 ++++++++++++++++++--
> 1 file changed, 18 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/clk/qcom/videocc-sm8150.c b/drivers/clk/qcom/videocc-sm8150.c
> index 52a9a453a143..b57df5ff96c4 100644
> --- a/drivers/clk/qcom/videocc-sm8150.c
> +++ b/drivers/clk/qcom/videocc-sm8150.c
> @@ -6,6 +6,7 @@
> #include <linux/clk-provider.h>
> #include <linux/module.h>
> #include <linux/platform_device.h>
> +#include <linux/pm_runtime.h>
> #include <linux/regmap.h>
>
> #include <dt-bindings/clock/qcom,videocc-sm8150.h>
> @@ -240,17 +241,32 @@ MODULE_DEVICE_TABLE(of, video_cc_sm8150_match_table);
> static int video_cc_sm8150_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, &video_cc_sm8150_desc);
> - if (IS_ERR(regmap))
> + if (IS_ERR(regmap)) {
> + pm_runtime_put(&pdev->dev);
Shouldn't this be _sync?
Konrad
Powered by blists - more mailing lists