[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <df8f1406-e586-3e3c-987c-826b52702a3b@gmail.com>
Date: Wed, 24 Aug 2022 07:51:26 +0900
From: Chanwoo Choi <cwchoi00@...il.com>
To: AngeloGioacchino Del Regno
<angelogioacchino.delregno@...labora.com>, myungjoo.ham@...sung.com
Cc: kyungmin.park@...sung.com, cw00.choi@...sung.com,
matthias.bgg@...il.com, lgirdwood@...il.com, broonie@...nel.org,
jia-wei.chang@...iatek.com, johnson.wang@...iatek.com,
linux-pm@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-mediatek@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] PM / devfreq: mtk-cci: Handle sram regulator probe
deferral
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@...labora.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
Powered by blists - more mailing lists