From: Val Packett <val@packett.cool>
Cc: "Val Packett" <val@packett.cool>,
"Marc Lainez" <marc.lainez@gmail.com>,
"Luca Weiss" <luca.weiss@fairphone.com>,
"Barnabás Czémán" <barnabas.czeman@mainlining.org>,
"Danila Tikhonov" <danila@jiaxyga.com>,
"Sebastian Reichel" <sre@kernel.org>,
"Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Bjorn Andersson" <andersson@kernel.org>,
"Konrad Dybcio" <konradybcio@kernel.org>,
"Abel Vesa" <abelvesa@kernel.org>,
"Jonathan Cameron" <jic23@kernel.org>,
"David Lechner" <dlechner@baylibre.com>,
"Nuno Sá" <nuno.sa@analog.com>,
"Andy Shevchenko" <andy@kernel.org>,
linux-arm-msm@vger.kernel.org, linux-pm@vger.kernel.org,
devicetree@vger.kernel.org, phone-devel@vger.kernel.org,
linux-iio@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 0/5] Add driver for Qualcomm QGauge (qcom_qg) fuel gauge
Date: Thu, 12 Nov 2026 14:07:26 -0300 [thread overview]
Message-ID: <20261112170841.2189322-1-val@packett.cool> (raw)
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@packett.cool/
[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
next reply other threads:[~2026-11-12 17:09 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 17:07 Val Packett [this message]
2026-11-12 17:07 ` [PATCH 1/5] dt-bindings: power: supply: add Qualcomm QGauge " Val Packett
2026-11-12 17:07 ` [PATCH 2/5] power: supply: add Qualcomm QGauge (qcom_qg) fuel gauge driver Val Packett
2026-11-12 17:07 ` [PATCH 3/5] iio: adc: qcom-spmi-adc5: Add ADC5_BAT_THERM_100K_PU Val Packett
2026-11-12 17:07 ` [PATCH 4/5] arm64: dts: qcom: pmi632: Add missing bat_therm ADC channel Val Packett
2026-11-12 17:07 ` [PATCH 5/5] arm64: dts: qcom: pmi632: Add battery fuel gauge node Val Packett
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=20261112170841.2189322-1-val@packett.cool \
--to=val@packett.cool \
--cc=abelvesa@kernel.org \
--cc=andersson@kernel.org \
--cc=andy@kernel.org \
--cc=barnabas.czeman@mainlining.org \
--cc=conor+dt@kernel.org \
--cc=danila@jiaxyga.com \
--cc=devicetree@vger.kernel.org \
--cc=dlechner@baylibre.com \
--cc=jic23@kernel.org \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-pm@vger.kernel.org \
--cc=luca.weiss@fairphone.com \
--cc=marc.lainez@gmail.com \
--cc=nuno.sa@analog.com \
--cc=phone-devel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=sre@kernel.org \
/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
all inboxes | Powered by JetHome®