Re: [PATCH 6/7] clk: qcom: gcc-sc8180x: Add runtime PM
From: Dmitry Baryshkov
Date: Mon Mar 09 2026 - 16:11:48 EST
On Sun, Mar 08, 2026 at 10:06:03PM -0300, Val Packett wrote:
> The GCC block on SC8180X is powered by the CX rail. We need to ensure
> that it's enabled to prevent unwanted power collapse.
>
> Enable runtime PM to keep the power flowing only when necessary.
>
> Signed-off-by: Val Packett <val@xxxxxxxxxxxx>
> ---
> drivers/clk/qcom/gcc-sc8180x.c | 28 +++++++++++++++++++++++++---
> 1 file changed, 25 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/clk/qcom/gcc-sc8180x.c b/drivers/clk/qcom/gcc-sc8180x.c
> index 365943cd5278..073fb1e2b302 100644
> --- a/drivers/clk/qcom/gcc-sc8180x.c
> +++ b/drivers/clk/qcom/gcc-sc8180x.c
> @@ -9,6 +9,7 @@
> #include <linux/err.h>
> #include <linux/kernel.h>
> #include <linux/module.h>
> +#include <linux/pm_runtime.h>
> #include <linux/of.h>
> #include <linux/platform_device.h>
> #include <linux/regmap.h>
> @@ -4676,9 +4677,19 @@ static int gcc_sc8180x_probe(struct platform_device *pdev)
> struct regmap *regmap;
> int ret;
>
> + ret = devm_pm_runtime_enable(&pdev->dev);
Please don't hardcode this. There is a .use_rpm nowadays.
> + if (ret)
> + return ret;
> +
--
With best wishes
Dmitry