Linux kernel -stable discussions
 help / color / mirror / Atom feed
* [PATCH 0/3] power: supply: qcom_battmgr: fix SM8350/SM8550 units, acks, and negative temp
@ 2026-11-18 23:16 Alexandru Andrieș via B4 Relay
  2026-11-18 23:16 ` [PATCH 1/3] power: supply: qcom_battmgr: set mAh unit for SM8350 and SM8550 Alexandru Andrieș via B4 Relay
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Alexandru Andrieș via B4 Relay @ 2026-11-18 23:16 UTC (permalink / raw)
  To: Sebastian Reichel, Neil Armstrong
  Cc: Bjorn Andersson, Konrad Dybcio, Dmitry Baryshkov, linux-pm,
	linux-arm-msm, linux-kernel, Sebastian Reichel, stable,
	Alexandru Andrieș

Fix three issues in qcom_battmgr encountered while bringing up PMIC GLINK
battery reporting on a Xiaomi MIX 4 (xiaomi-odin, SM8350):

1. Set battmgr->unit to QCOM_BATTMGR_UNIT_mAh on SM8350 and SM8550 so
   charge_full and charge_full_design stop returning -ENODATA.
2. Complete &battmgr->ack on invalid payload length errors in both
   callbacks so callers receive -ENODATA immediately instead of stalling
   for 1s with -ETIMEDOUT and aborting power_supply_uevent().
3. Change status.temperature and qcom_battmgr_sc8280xp_convert_temp() to
   int and cast SM8350 BATT_TEMP values to s32 before dividing by 10 so
   sub-zero temperatures do not wrap into large positive values.

Testing:
- Built warning-free (W=1) on arm64 against commit 97d73c825122.
- Tested on a Xiaomi MIX 4 (xiaomi-odin, SM8350) with UPower 1.91.0.
- The SM8550 variant in patch 1, the SC8280XP paths in patches 2 and 3,
  and sub-zero battery temperatures (< 0 C) in patch 3 were not
  hardware-tested.

AI disclosure:
- Debugged and drafted with assistance from Gemini 4 Carbon
  (Antigravity), and reviewed and tested on hardware by the submitter.

---
Alexandru Andrieș (3):
      power: supply: qcom_battmgr: set mAh unit for SM8350 and SM8550
      power: supply: qcom_battmgr: complete ack on callback payload errors
      power: supply: qcom_battmgr: fix negative temperature values

 drivers/power/supply/qcom_battmgr.c | 27 ++++++++++++++++-----------
 1 file changed, 16 insertions(+), 11 deletions(-)
---
base-commit: 97d73c8251226cf27cc6656b4c542869bb8c69fa
change-id: 20261119-upstream-qcom-battmgr-fixes-v1-004f34587c42

Best regards,
--  
Alexandru Andrieș <alex.andries.aa@gmail.com>



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-12-02  5:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-18 23:16 [PATCH 0/3] power: supply: qcom_battmgr: fix SM8350/SM8550 units, acks, and negative temp Alexandru Andrieș via B4 Relay
2026-11-18 23:16 ` [PATCH 1/3] power: supply: qcom_battmgr: set mAh unit for SM8350 and SM8550 Alexandru Andrieș via B4 Relay
2026-12-02  2:45   ` Sebastian Reichel
2026-11-18 23:16 ` [PATCH 2/3] power: supply: qcom_battmgr: complete ack on callback payload errors Alexandru Andrieș via B4 Relay
2026-11-18 23:16 ` [PATCH 3/3] power: supply: qcom_battmgr: fix negative temperature values Alexandru Andrieș via B4 Relay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox