From: Majid Hajiheidari <majidhhdri@gmail.com>
To: val@packett.cool
Cc: marc.lainez@gmail.com, luca.weiss@fairphone.com,
barnabas.czeman@mainlining.org, danila@jiaxyga.com,
sre@kernel.org, robh@kernel.org, krzk+dt@kernel.org,
conor+dt@kernel.org, andersson@kernel.org,
konradybcio@kernel.org, abelvesa@kernel.org, jic23@kernel.org,
dlechner@baylibre.com, nuno.sa@analog.com, 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: Re: [PATCH 0/5] Add driver for Qualcomm QGauge (qcom_qg) fuel gauge
Date: Sun, 15 Nov 2026 02:22:47 +0100 [thread overview]
Message-ID: <20261115012247.621144-1-majidhhdri@gmail.com> (raw)
In-Reply-To: <20261112170841.2189322-1-val@packett.cool>
Hi Val,
On Thu, 12 Nov 2026 14:07:26 -0300, Val Packett wrote:
> 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.
I tried v1 on an SM6125 phone, a Xiaomi Mi A3 (sm6125-xiaomi-laurel-sprout,
PMI632), on top of next-20261113. Board side: the node enabled with
monitored-battery (simple-battery with the OCV table from the stock
profile), io-channels = <&pmi632_adc ADC5_BAT_THERM_100K_PU> as
"batt-therm" and power-supplies = <&pmi632_typec>.
It probes without any kernel log output and reports sane values:
capacity 66
voltage_now 3979548 (vbat_sns from the ADC: 3.98 V)
voltage_avg 3979937
current_now -72631
temp 297 (SoC TSENS zones: 29-30 C)
charge_full 4048000 (design 4030000, so the SDAM read works)
health Good
status Charging
Two things I noticed:
- voltage_ocv returns -ENODATA ("No data available") while capacity is
reported at the same time. Is that intended, e.g. the PON OCV being
used for capacity but not exposed?
- status is derived only from power_supply_am_i_supplied(), so it says
Charging whenever USB is connected. On my phone the charger float
voltage is limited to 3.96 V with a local patch and the battery sits at
3.98 V, so current_now stays at about -70 mA (discharging) while status
reads Charging. I would expect the same once a battery is full. Would
it make sense to report Not charging / Full based on the current?
Tested-by: Majid Hajiheidari <majidhhdri@gmail.com> # sm6125-xiaomi-laurel-sprout
Happy to test v2 as well.
Thanks,
Majid
prev parent reply other threads:[~2026-11-15 1:22 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-12 17:07 [PATCH 0/5] Add driver for Qualcomm QGauge (qcom_qg) fuel gauge Val Packett
2026-11-12 17:07 ` [PATCH 1/5] dt-bindings: power: supply: add Qualcomm QGauge " Val Packett
2026-11-13 11:22 ` Krzysztof Kozlowski
2026-11-12 17:07 ` [PATCH 2/5] power: supply: add Qualcomm QGauge (qcom_qg) fuel gauge driver Val Packett
2026-11-13 6:27 ` Uwe Kleine-König
2026-11-12 17:07 ` [PATCH 3/5] iio: adc: qcom-spmi-adc5: Add ADC5_BAT_THERM_100K_PU Val Packett
2026-11-13 1:02 ` Jonathan Cameron
2026-11-13 10:09 ` Luca Weiss
2026-11-13 10:48 ` 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
2026-11-13 11:25 ` Krzysztof Kozlowski
2026-11-15 1:22 ` Majid Hajiheidari [this message]
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=20261115012247.621144-1-majidhhdri@gmail.com \
--to=majidhhdri@gmail.com \
--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 \
--cc=val@packett.cool \
/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