[PATCH 0/5] Add driver for Qualcomm QGauge (qcom_qg) fuel gauge
From: Val Packett
Date: Thu Nov 12 2026 - 12:24:10 EST
Hi o/
This series adds a driver for the "qgauge" battery fuel gauge
present in Qualcomm PMICs like PMI632, PM6150, PM7250B, PM2250.
The PMI632 is used in SDM632, SM6115/SM4250, SM6125 based phones.
This series was tested on sm6115-motorola-{cebu,guamp}, whose basic
dts has been submitted as [1].
There have been two attempts at making this driver, the first one
"WIP! power: supply: Add rude driver for QGauge" as found in
various development forks [2] was rather infamous for wild capacity%
swings due to load variation :D
The second one was submitted to msm8953-mainline at [3] by
Marc Lainez, and it behaved much better thanks to the use of
power_supply_batinfo_ocv2cap.
This is a continuation of that work, carrying his From/S-o-b on
modified patches with explicit permission. I have added the
SDAM read via NVMEM API, fixed the batt_info leak and did some
general cleanup.
With the SMB5 work also going on right now, we'll finally have
full battery support on these awkward pre-battmgr generations!
[1]: https://lore.kernel.org/all/20261109221453.658316-1-val@xxxxxxxxxxxx/
[2]: https://github.com/sm7150-mainline/linux/commit/76879bf7a71f4f8f66b9bcd7175069ca7bbf4274
[3]: https://github.com/msm8953-mainline/linux/pull/242
Thanks,
~val
---
Marc Lainez (2):
dt-bindings: power: supply: add Qualcomm QGauge fuel gauge
power: supply: add Qualcomm QGauge (qcom_qg) fuel gauge driver
Val Packett (3):
iio: adc: qcom-spmi-adc5: Add ADC5_BAT_THERM_100K_PU
arm64: dts: qcom: pmi632: Add missing bat_therm ADC channel
arm64: dts: qcom: pmi632: Add battery fuel gauge node
.../bindings/power/supply/qcom,qg.yaml | 105 +++
MAINTAINERS | 7 +
arch/arm64/boot/dts/qcom/pmi632.dtsi | 41 +
drivers/iio/adc/qcom-spmi-adc5.c | 2 +
drivers/power/supply/Kconfig | 13 +
drivers/power/supply/Makefile | 1 +
drivers/power/supply/qcom_qg.c | 807 ++++++++++++++++++
7 files changed, 976 insertions(+)
create mode 100644 Documentation/devicetree/bindings/power/supply/qcom,qg.yaml
create mode 100644 drivers/power/supply/qcom_qg.c
--
2.56.0