|
|
Log in / Subscribe / Register

power: supply: qcom_battmgr: Add thermal mitigation support

From:  DhruvinRajpura <dhruvin.rajpura-AT-oss.qualcomm.com>
To:  Bjorn Andersson <andersson-AT-kernel.org>, Konrad Dybcio <konradybcio-AT-kernel.org>, Rob Herring <robh-AT-kernel.org>, Krzysztof Kozlowski <krzk+dt-AT-kernel.org>, Conor Dooley <conor+dt-AT-kernel.org>, Sebastian Reichel <sre-AT-kernel.org>
Subject:  [PATCH 0/2] power: supply: qcom_battmgr: Add thermal mitigation support
Date:  Tue, 09 Jun 2026 14:46:41 +0530
Message-ID:  <20260609-cooling_device_reg-v1-0-e15bddcb0086@qti.qualcomm.com>
Cc:  linux-arm-msm-AT-vger.kernel.org, devicetree-AT-vger.kernel.org, linux-kernel-AT-vger.kernel.org, linux-pm-AT-vger.kernel.org, dhruvin.rajpura-AT-oss.qualcomm.com, kamal.wadhwa-AT-oss.qualcomm.com, jishnu.prakash-AT-oss.qualcomm.com, Dhruvin Rajpura <drajpura-AT-qti.qualcomm.com>, Subbaraman Narayanamurthy <quic_subbaram-AT-quicinc.com>, Umang Chheda <quic_uchheda-AT-quicinc.com>
Archive-link:  Article

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.

Signed-off-by: Dhruvin Rajpura <drajpura@qti.qualcomm.com>
---
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,
--  
DhruvinRajpura <drajpura@qti.qualcomm.com>




Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds