From: Stephen Boyd <sboyd@kernel.org>
To: Douglas Anderson <dianders@chromium.org>
Cc: David Brown <david.brown@linaro.org>,
Rajendra Nayak <rnayak@codeaurora.org>,
linux-soc@vger.kernel.org, Taniya Das <tdas@codeaurora.org>,
Douglas Anderson <dianders@chromium.org>,
Andy Gross <agross@kernel.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Michael Turquette <mturquette@baylibre.com>,
linux-arm-msm@vger.kernel.org, linux-clk@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] clk: qcom: lpasscc: Re-configure the PLL in case lost
Date: Wed, 14 Oct 2020 10:06:32 -0700 [thread overview]
Message-ID: <160269519265.884498.6320532206038624483@swboyd.mtv.corp.google.com> (raw)
In-Reply-To: <20201014085758.v2.1.Id0cc5d859e2422082a29a7909658932c857f5a81@changeid>
Quoting Douglas Anderson (2020-10-14 08:58:24)
> diff --git a/drivers/clk/qcom/lpasscorecc-sc7180.c b/drivers/clk/qcom/lpasscorecc-sc7180.c
> index 228d08f5d26f..ee23eb5b9bf2 100644
> --- a/drivers/clk/qcom/lpasscorecc-sc7180.c
> +++ b/drivers/clk/qcom/lpasscorecc-sc7180.c
> @@ -356,6 +356,25 @@ static const struct qcom_cc_desc lpass_audio_hm_sc7180_desc = {
> .num_gdscs = ARRAY_SIZE(lpass_audio_hm_sc7180_gdscs),
> };
>
> +static int lpass_core_cc_pm_clk_resume(struct device *dev)
> +{
> + struct regmap *regmap = dev_get_drvdata(dev);
Can we use dev_get_remap(dev, NULL) instead?
> + unsigned int l_val;
> + int ret;
> +
> + ret = pm_clk_resume(dev);
> + if (ret)
> + return ret;
> +
> + /* Read PLL_L_VAL */
Please drop this useless comment. Replace it with something like this
(if at all):
/* Reconfigure PLL if PLL was reset across suspend */
> + regmap_read(regmap, 0x1004, &l_val);
> + if (!l_val)
> + clk_fabia_pll_configure(&lpass_lpaaudio_dig_pll, regmap,
> + &lpass_lpaaudio_dig_pll_config);
> +
> + return 0;
> +}
> +
> static int lpass_core_cc_sc7180_probe(struct platform_device *pdev)
> {
> const struct qcom_cc_desc *desc;
> @@ -373,6 +392,8 @@ static int lpass_core_cc_sc7180_probe(struct platform_device *pdev)
> if (IS_ERR(regmap))
> return PTR_ERR(regmap);
>
> + dev_set_drvdata(&pdev->dev, regmap);
> +
And then this isn't needed.
> /*
> * Keep the CLK always-ON
> * LPASS_AUDIO_CORE_SYSNOC_SWAY_CORE_CLK
next prev parent reply other threads:[~2020-10-14 17:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-10-14 15:58 [PATCH v2] clk: qcom: lpasscc: Re-configure the PLL in case lost Douglas Anderson
2020-10-14 17:06 ` Stephen Boyd [this message]
2020-10-14 21:13 ` Doug Anderson
2020-10-14 17:21 ` Taniya Das
2020-10-14 21:13 ` Doug Anderson
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=160269519265.884498.6320532206038624483@swboyd.mtv.corp.google.com \
--to=sboyd@kernel.org \
--cc=agross@kernel.org \
--cc=bjorn.andersson@linaro.org \
--cc=david.brown@linaro.org \
--cc=dianders@chromium.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-soc@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=rnayak@codeaurora.org \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).