From: Chanwoo Choi <cwchoi00@gmail.com>
To: AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com>,
myungjoo.ham@samsung.com
Cc: kyungmin.park@samsung.com, cw00.choi@samsung.com,
matthias.bgg@gmail.com, lgirdwood@gmail.com, broonie@kernel.org,
jia-wei.chang@mediatek.com, johnson.wang@mediatek.com,
linux-pm@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-mediatek@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] PM / devfreq: mtk-cci: Handle sram regulator probe deferral
Date: Wed, 24 Aug 2022 07:51:26 +0900 [thread overview]
Message-ID: <df8f1406-e586-3e3c-987c-826b52702a3b@gmail.com> (raw)
In-Reply-To: <20220713111511.115007-1-angelogioacchino.delregno@collabora.com>
On 22. 7. 13. 20:15, AngeloGioacchino Del Regno wrote:
> If the regulator_get_optional() call for the SRAM regulator returns
> a probe deferral, we must bail out and retry probing later: failing
> to do this will produce unstabilities on platforms requiring the
> handling for this regulator.
>
> Fixes: b615b00c42da ("PM / devfreq: mediatek: Introduce MediaTek CCI devfreq driver")
> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> ---
> drivers/devfreq/mtk-cci-devfreq.c | 8 ++++++--
> 1 file changed, 6 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/devfreq/mtk-cci-devfreq.c b/drivers/devfreq/mtk-cci-devfreq.c
> index 71abb3fbd042..e5458ada5197 100644
> --- a/drivers/devfreq/mtk-cci-devfreq.c
> +++ b/drivers/devfreq/mtk-cci-devfreq.c
> @@ -291,9 +291,13 @@ static int mtk_ccifreq_probe(struct platform_device *pdev)
> }
>
> drv->sram_reg = devm_regulator_get_optional(dev, "sram");
> - if (IS_ERR(drv->sram_reg))
> + if (IS_ERR(drv->sram_reg)) {
> + ret = PTR_ERR(drv->sram_reg);
> + if (ret == -EPROBE_DEFER)
> + goto out_free_resources;
> +
> drv->sram_reg = NULL;
> - else {
> + } else {
> ret = regulator_enable(drv->sram_reg);
> if (ret) {
> dev_err(dev, "failed to enable sram regulator\n");
Applied it. Thanks
--
Best Regards,
Samsung Electronics
Chanwoo Choi
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
prev parent reply other threads:[~2022-08-23 22:52 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-07-13 11:15 [PATCH] PM / devfreq: mtk-cci: Handle sram regulator probe deferral AngeloGioacchino Del Regno
2022-08-23 22:51 ` Chanwoo Choi [this message]
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=df8f1406-e586-3e3c-987c-826b52702a3b@gmail.com \
--to=cwchoi00@gmail.com \
--cc=angelogioacchino.delregno@collabora.com \
--cc=broonie@kernel.org \
--cc=cw00.choi@samsung.com \
--cc=jia-wei.chang@mediatek.com \
--cc=johnson.wang@mediatek.com \
--cc=kyungmin.park@samsung.com \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mediatek@lists.infradead.org \
--cc=linux-pm@vger.kernel.org \
--cc=matthias.bgg@gmail.com \
--cc=myungjoo.ham@samsung.com \
/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).