From: sashiko-bot@kernel.org
To: "Herman van Hazendonk" <github.com@herrie.org>
Cc: robh@kernel.org, conor+dt@kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH v2 3/3] thermal: qcom: add PM8901 PMIC temperature-alarm driver
Date: Sun, 31 May 2026 04:41:43 +0000 [thread overview]
Message-ID: <20260531044144.484541F00893@smtp.kernel.org> (raw)
In-Reply-To: <aebf87a1be4512aa6158faf45001ee04caa397fc.1780197411.git.github.com@herrie.org>
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [High] The driver disables the PMIC's hardware thermal auto-shutdown during probe but does not implement a `.shutdown` callback to restore it, leaving the device physically unprotected across warm reboots.
- [High] The driver overrides the PMIC's hardware thermal shutdown but fails to configure the thermal interrupts as system wakeup sources or restore the hardware shutdown during suspend, leaving the device unprotected while suspended.
--
commit ea0822f7dd85ca701edd835f63cf382da86b80eb
Author: Herman van Hazendonk <github.com@herrie.org>
thermal: qcom: add PM8901 PMIC temperature-alarm driver
Add a thermal-of sensor driver for the temperature-alarm block inside
the Qualcomm PM8901 PMIC. It exposes an over-temperature alarm at SSBI
offset 0x23/0x24 with three escalating stages.
> diff --git a/drivers/thermal/qcom/qcom-pm8901-tm.c b/drivers/thermal/qcom/qcom-pm8901-tm.c
> new file mode 100644
> index 0000000000000..b159e9917c2c9
> --- /dev/null
> +++ b/drivers/thermal/qcom/qcom-pm8901-tm.c
[ ... ]
> + chip->tz_dev = devm_thermal_of_zone_register(&pdev->dev, 0, chip,
> + &pm8901_tm_zone_ops);
> + if (IS_ERR(chip->tz_dev))
> + return dev_err_probe(&pdev->dev, PTR_ERR(chip->tz_dev),
> + "thermal zone register failed\n");
> +
> + ret = devm_request_threaded_irq(&pdev->dev, irq_alarm, NULL,
> + pm8901_tm_isr, IRQF_ONESHOT,
> + "pm8901-tm-alarm", chip);
[Severity: High]
Since the PMIC's hardware thermal shutdown is overridden by the software
driver during probe, should these thermal interrupts be configured as system
wakeup sources?
During system suspend, non-wakeup interrupts are disabled and the software
thermal core sleeps. Without wakeup enabled, could the device overheat while
suspended without the hardware or OS acting on it to prevent damage?
[ ... ]
> +static const struct of_device_id pm8901_tm_match_table[] = {
> + { .compatible = "qcom,pm8901-temp-alarm" },
> + { }
> +};
> +MODULE_DEVICE_TABLE(of, pm8901_tm_match_table);
> +
> +static struct platform_driver pm8901_tm_driver = {
> + .driver = {
> + .name = "pm8901-temp-alarm",
> + .of_match_table = pm8901_tm_match_table,
> + },
> + .probe = pm8901_tm_probe,
> +};
[Severity: High]
Is a .shutdown callback needed in pm8901_tm_driver to restore the PMIC's
hardware thermal auto-shutdown?
While pm8901_tm_enable_sw_override() registers a devm action to restore it
on unbind, devm actions are not executed during the system shutdown or reboot
path in device_shutdown().
Could this leave the device in software-override mode across a warm reboot,
where it would be physically unprotected if it overheats during the bootloader
phase before the OS boots?
Additionally, does this driver need suspend and resume PM callbacks in
dev_pm_ops to temporarily re-enable the hardware shutdown while the software
thermal core is asleep?
--
Sashiko AI review · https://sashiko.dev/#/patchset/cover.1780197411.git.github.com@herrie.org?part=3
prev parent reply other threads:[~2026-05-31 4:41 UTC|newest]
Thread overview: 46+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-30 13:59 [PATCH 0/2] clk: qcom: add MSM8x60 LPASS Clock Controller Herman van Hazendonk
2026-05-30 13:58 ` [PATCH 1/3] dt-bindings: clock: qcom: add mmcc-msm8660 clock IDs Herman van Hazendonk
2026-05-30 13:58 ` [PATCH 2/3] dt-bindings: reset: qcom: add mmcc-msm8660 reset IDs Herman van Hazendonk
2026-05-30 13:59 ` [PATCH 0/3] clk: qcom: add MSM8x60 Multimedia Clock Controller Herman van Hazendonk
2026-05-30 13:59 ` [PATCH 1/2] dt-bindings: clock: qcom: add lcc-msm8660 LPASS clock IDs Herman van Hazendonk
2026-05-30 14:15 ` sashiko-bot
2026-05-30 13:59 ` [PATCH 2/2] clk: qcom: add MSM8x60 LCC (LPASS) driver Herman van Hazendonk
2026-05-30 14:25 ` sashiko-bot
2026-05-30 14:00 ` [PATCH 0/2] interconnect: qcom: add MSM8x60 NoC driver Herman van Hazendonk
2026-05-30 14:00 ` [PATCH 1/2] dt-bindings: interconnect: qcom: add msm8660 fabric IDs Herman van Hazendonk
2026-05-30 14:00 ` [PATCH 2/2] interconnect: qcom: add MSM8x60 NoC driver Herman van Hazendonk
2026-05-30 14:14 ` sashiko-bot
2026-05-30 14:00 ` [PATCH 1/2] dt-bindings: interrupt-controller: qcom: add msm8660-mpm Herman van Hazendonk
2026-05-30 14:00 ` [PATCH 2/2] irqchip: add MSM8x60 MPM wakeup interrupt controller driver Herman van Hazendonk
2026-05-30 14:22 ` sashiko-bot
2026-05-30 14:00 ` [PATCH 0/2] thermal: qcom: add PM8901 PMIC temperature-alarm driver Herman van Hazendonk
2026-05-30 14:00 ` [PATCH 1/2] dt-bindings: thermal: qcom: add pm8901-temp-alarm Herman van Hazendonk
2026-05-30 14:08 ` sashiko-bot
2026-05-30 20:48 ` Rob Herring (Arm)
2026-05-30 14:00 ` [PATCH 2/2] thermal: qcom: add PM8901 PMIC temperature-alarm driver Herman van Hazendonk
2026-05-30 14:16 ` sashiko-bot
2026-05-31 4:08 ` [PATCH v2 0/3] clk: qcom: add MSM8x60 LPASS Clock Controller Herman van Hazendonk
2026-05-31 4:09 ` [PATCH v2 1/3] dt-bindings: clock: qcom,lcc: add MSM8x60 family compatibles Herman van Hazendonk
2026-05-31 4:14 ` sashiko-bot
2026-05-31 7:58 ` Krzysztof Kozlowski
2026-05-31 4:09 ` [PATCH v2 2/3] dt-bindings: clock: qcom: add lcc-msm8660 LPASS clock IDs Herman van Hazendonk
2026-05-31 4:23 ` sashiko-bot
2026-05-31 4:09 ` [PATCH v2 3/3] clk: qcom: add MSM8x60 LCC (LPASS) driver Herman van Hazendonk
2026-05-31 4:33 ` sashiko-bot
2026-05-31 4:09 ` [PATCH v2 0/2] irqchip: add MSM8x60 MPM wakeup interrupt controller Herman van Hazendonk
2026-05-31 4:09 ` [PATCH v2 1/2] dt-bindings: interrupt-controller: qcom: add msm8660-mpm Herman van Hazendonk
2026-05-31 4:20 ` sashiko-bot
2026-05-31 8:01 ` Krzysztof Kozlowski
2026-05-31 4:09 ` [PATCH v2 2/2] irqchip: add MSM8x60 MPM wakeup interrupt controller driver Herman van Hazendonk
2026-05-31 4:32 ` sashiko-bot
2026-05-31 4:09 ` [PATCH v2 0/3] thermal: qcom: add PM8901 PMIC temperature-alarm driver Herman van Hazendonk
2026-05-31 4:09 ` [PATCH v2 0/2] interconnect: qcom: add MSM8x60 NoC driver Herman van Hazendonk
2026-05-31 4:09 ` [PATCH v2 1/2] dt-bindings: interconnect: qcom: add msm8660 fabric IDs Herman van Hazendonk
2026-05-31 8:00 ` Krzysztof Kozlowski
2026-05-31 4:09 ` [PATCH v2 2/2] interconnect: qcom: add MSM8x60 NoC driver Herman van Hazendonk
2026-05-31 4:34 ` sashiko-bot
2026-05-31 4:09 ` [PATCH v2 1/3] dt-bindings: mfd: qcom-pm8xxx: allow temp-alarm subnode Herman van Hazendonk
2026-05-31 7:59 ` Krzysztof Kozlowski
2026-05-31 4:09 ` [PATCH v2 2/3] dt-bindings: thermal: qcom: add pm8901-temp-alarm Herman van Hazendonk
2026-05-31 4:09 ` [PATCH v2 3/3] thermal: qcom: add PM8901 PMIC temperature-alarm driver Herman van Hazendonk
2026-05-31 4:41 ` sashiko-bot [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=20260531044144.484541F00893@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=github.com@herrie.org \
--cc=robh@kernel.org \
--cc=sashiko-reviews@lists.linux.dev \
/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