[PATCH v2 0/3] thermal: qcom: add PM8901 PMIC temperature-alarm driver
From: Herman van Hazendonk
Date: Sun May 31 2026 - 00:13:16 EST
Hi all,
Self-review (with Sashiko AI assist) caught issues in v1 before
maintainer review reached them; re-rolling promptly. v1:
https://lore.kernel.org/linux-arm-msm/cover.1780148149.git.github.com@xxxxxxxxxx/
v2 changes:
- NEW patch 1/3: extend the qcom,pm8xxx parent schema with a
`temp-alarm@[0-9a-f]+$` patternProperty so the new sub-node
validates as a recognised child of the PMIC. Without this, any
board DT instantiating the temp-alarm sub-node fails
dt_binding_check (CI bot caught this on v1).
- patch 2/3: thermal binding YAML rewritten:
* add `allOf: $ref: /schemas/thermal/thermal-sensor.yaml#`;
* rewrite the example so the parent qcom,pm8901 node itself
satisfies its own schema (reg, address-cells, interrupts,
interrupt-controller) - addresses the CI bot's `'interrupts'
is a required property` complaint on the embedded pmic node;
* reword the commit message; v1 incorrectly said the binding
describes the "GIC interrupt" and "parent PMIC reference"
(the interrupts are actually PMIC-internal, and the parent
relationship is the standard DT parent-child hierarchy).
- patch 3/3: driver fixes:
* defer the SW-override switch (which disables PMIC HW
auto-shutdown) to the very end of probe and install a devm
action that restores HW auto-shutdown on unbind, so the part
is never left without any thermal protection if an earlier
probe step fails;
* fix the first-read temperature comment: the formula computes
the lower bound of the current stage, not the midpoint;
* snapshot chip->stage/thresh/temp under chip->lock before
printing the boot banner so the values are consistent now
that the ISR is live;
* drop the explicit ->remove(), the new devm restore action
replaces it.
dt_binding_check passes on both the parent qcom,pm8xxx and the new
qcom,pm8901-temp-alarm. Driver passes checkpatch with zero warnings
or errors.
Thanks,
Herman
Herman van Hazendonk (3):
dt-bindings: mfd: qcom-pm8xxx: allow temp-alarm subnode
dt-bindings: thermal: qcom: add pm8901-temp-alarm
thermal: qcom: add PM8901 PMIC temperature-alarm driver
.../devicetree/bindings/mfd/qcom-pm8xxx.yaml | 4 +
.../thermal/qcom,pm8901-temp-alarm.yaml | 90 ++++
drivers/thermal/qcom/Kconfig | 12 +
drivers/thermal/qcom/Makefile | 1 +
drivers/thermal/qcom/qcom-pm8901-tm.c | 408 ++++++++++++++++++
5 files changed, 515 insertions(+)
create mode 100644 Documentation/devicetree/bindings/thermal/qcom,pm8901-temp-alarm.yaml
create mode 100644 drivers/thermal/qcom/qcom-pm8901-tm.c
--
2.43.0