From: "niklas.soderlund" <niklas.soderlund@ragnatech.se>
To: Biju Das <biju.das.jz@bp.renesas.com>
Cc: Jiawen Liu <1298662399@qq.com>,
"Rafael J. Wysocki" <rafael@kernel.org>,
Daniel Lezcano <daniel.lezcano@kernel.org>,
Geert Uytterhoeven <geert+renesas@glider.be>,
"magnus.damm" <magnus.damm@gmail.com>,
Zhang Rui <rui.zhang@intel.com>,
Lukasz Luba <lukasz.luba@arm.com>,
"linux-renesas-soc@vger.kernel.org"
<linux-renesas-soc@vger.kernel.org>,
"linux-pm@vger.kernel.org" <linux-pm@vger.kernel.org>,
"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] thermal: rcar: handle runtime resume failures during probe
Date: Mon, 30 Nov 2026 16:38:01 +0100 [thread overview]
Message-ID: <20261130153801.GP3898744@ragnatech.se> (raw)
In-Reply-To: <TYYPR01MB660309318BFFA01D4A4BA8F6864E2@TYYPR01MB6603.jpnprd01.prod.outlook.com>
Hello,
On 2026-11-30 06:46:16 +0000, Biju Das wrote:
> Hi Jiawen Liu,
>
> Thanks for the patch.
>
> > -----Original Message-----
> > From: Jiawen Liu <1298662399@qq.com>
> > Sent: 29 November 2026 13:03
> > Subject: [PATCH] thermal: rcar: handle runtime resume failures during probe
> >
> > rcar_thermal_probe() ignores the synchronous runtime resume result and continues to sensor MMIO and
> > thermal-zone registration after the PM core reports failure.
> >
> > Use pm_runtime_resume_and_get(), which retains a usage reference only after a successful resume. On
> > failure, disable runtime PM and return the original error before hardware initialization.
> >
> > Fixes: 51d45d25948b ("thermal: rcar: add pm_runtime_xxx() support")
> > Signed-off-by: Jiawen Liu <1298662399@qq.com>
> > ---
> > drivers/thermal/renesas/rcar_thermal.c | 6 +++++-
> > 1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/thermal/renesas/rcar_thermal.c b/drivers/thermal/renesas/rcar_thermal.c
> > index af6d09a75bb61..c6535b9cdd0fe 100644
> > --- a/drivers/thermal/renesas/rcar_thermal.c
> > +++ b/drivers/thermal/renesas/rcar_thermal.c
> > @@ -414,7 +414,11 @@ static int rcar_thermal_probe(struct platform_device *pdev)
> > common->dev = dev;
> >
> > pm_runtime_enable(dev);
> > - pm_runtime_get_sync(dev);
> > + ret = pm_runtime_resume_and_get(dev);
> > + if (ret) {
> > + pm_runtime_disable(dev);
>
> If you use devm_pm_runtime_enable() then you can drop the
> above.
I think I would prefer that, and the commit message update suggested by
Geert.
>
> Cheers,
> Biju
>
> > + return ret;
> > + }
> >
> > for (i = 0; i < chip->nirqs; i++) {
> > int irq;
> > --
> > 2.34.1
> >
>
--
Kind Regards,
Niklas Söderlund
next prev parent reply other threads:[~2026-11-30 15:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-29 13:02 [PATCH] thermal: rcar: handle runtime resume failures during probe Jiawen Liu
2026-11-30 6:46 ` Biju Das
2026-11-30 15:38 ` niklas.soderlund [this message]
2026-11-30 10:03 ` Geert Uytterhoeven
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=20261130153801.GP3898744@ragnatech.se \
--to=niklas.soderlund@ragnatech.se \
--cc=1298662399@qq.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=daniel.lezcano@kernel.org \
--cc=geert+renesas@glider.be \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=lukasz.luba@arm.com \
--cc=magnus.damm@gmail.com \
--cc=rafael@kernel.org \
--cc=rui.zhang@intel.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