Skip to content

power: supply: qcom_battmgr: Add thermal mitigation support

DhruvinRajpura linux-arm-msm linux-devicetree linux-pm lkml 1 version In review

Get series with b4
b4 am [email protected] change-id 20260609-cooling_device_reg-8e95c8eaab80

Versions newest first

  1. v1 Latest2 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2bindings: power: supply: qcom,pmic-glink: Document thermal-mitigationDocumentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml+10 -02 replies
2/2power: supply: qcom_battmgr: Add thermal mitigation supportdrivers/power/supply/qcom_battmgr.c+256 -02 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.

Read the v1 thread

Cover letter [PATCH 0/2] power: supply: qcom_battmgr: Add thermal mitigation support

Commit c85c191694cb ("power: supply: remove faulty cooling logic") removed automatic cooling device registration from the power supply framework. As a result, drivers requiring thermal mitigation must now explicitly register their own cooling devices with correct semantics.

This series adds thermal mitigation support to the Qualcomm PMIC GLink battery manager driver by registering a thermal cooling device that controls the battery fast charge current (FCC) in response to thermal events. The cooling states map to discrete current limits defined in the qcom,thermal-mitigation DT property, with state 0 representing the hardware maximum current queried from firmware and each subsequent state reducing the current to the next DT-defined value.

The series is structured as follows:

- Patch 1 documents the new qcom,thermal-mitigation DT property in the qcom,pmic-glink.yaml binding file.

- Patch 2 implements the thermal cooling device registration in the qcom_battmgr driver, including FCC control via firmware, PDR restart resilience, and power supply property exposure.

The implementation has been validated on a target where setting the cooling state via sysfs correctly reduces the observed battery charging current as expected.

---
Dhruvin Rajpura (2):
bindings: power: supply: qcom,pmic-glink: Document thermal-mitigation
power: supply: qcom_battmgr: Add thermal mitigation support

 .../bindings/soc/qcom/qcom,pmic-glink.yaml         |  10 +
 drivers/power/supply/qcom_battmgr.c                | 256 +++++++++++++++++++++
 2 files changed, 266 insertions(+)

---
base-commit: e7ae89a0c97ce2b68b0983cd01eda67cf373517d
change-id: 20260609-cooling_device_reg-8e95c8eaab80

Best regards,

Signature · 1 line
DhruvinRajpura <[email protected]>