Re: [PATCH v3 3/3] clk: qcom: lpasscc-sc7180: Re-configure the PLL in case lost

From: Doug Anderson
Date: Wed Oct 14 2020 - 21:30:50 EST


Hi,

On Wed, Oct 14, 2020 at 4:39 PM Stephen Boyd <sboyd@xxxxxxxxxx> wrote:
>
> Quoting Douglas Anderson (2020-10-14 14:05:23)
> > diff --git a/drivers/clk/qcom/lpasscorecc-sc7180.c b/drivers/clk/qcom/lpasscorecc-sc7180.c
> > index 48d370e2108e..e12d4c2b1b70 100644
> > --- a/drivers/clk/qcom/lpasscorecc-sc7180.c
> > +++ b/drivers/clk/qcom/lpasscorecc-sc7180.c
> > @@ -388,6 +388,25 @@ static int lpass_create_pm_clks(struct platform_device *pdev)
> > return ret;
> > }
> >
> > +static int lpass_core_cc_pm_clk_resume(struct device *dev)
> > +{
> > + struct regmap *regmap = dev_get_regmap(dev, "lpass_core_cc");
>
> Please make "lpass_core_cc" a static const pointer in this driver so
> that it can be used here and when the regmap is made so that we're
> certain they match.

Sure. In theory the compiler ought to use string constant pooling so
they would have pointed to the same place, but you're right that it
wouldn't catch typos or other cases where they don't match. I'll do
both regmap names just for symmetry. Hopefully that's OK.

-Doug