All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v5] bq27xxx: support interchangeable OnePlus 6/6T fuel gauges
@ 2026-10-18  0:51 Rinat Muhamedgaliev
  2026-10-18  0:51 ` [PATCH v5] power: supply: bq27xxx: detect bq27541 behind bq27411 compatible Rinat Muhamedgaliev
  0 siblings, 1 reply; 3+ messages in thread
From: Rinat Muhamedgaliev @ 2026-10-18  0:51 UTC (permalink / raw)
  To: linux-pm
  Cc: pali, sre, afd, konrad.dybcio, david, krzk, linux-arm-msm,
	linux-kernel, Rinat Muhamedgaliev

OnePlus 6 and 6T replacement battery packs can contain either a bq27411 or a
bq27541 fuel gauge. The latter requires a different register map and produces
invalid battery readings when interpreted as a bq27411.

v4 drops the proposed generic DT compatible and DTS changes. The I2C driver
instead reads DeviceType while probing the existing bq27411 compatible, and
selects the bq27541 profile if the device reports 0x0541.

The bq27541 path was tested on a OnePlus 6T with DeviceType 0x0541. It
reported 4.338 V, 100% capacity, 27.8 C, and Full/Good battery status.
Testing on an OnePlus 6 or 6T whose fuel gauge reports DeviceType 0x0421
(bq27411) would be appreciated.

Changes in v5:
- Report detected and expected DeviceType values instead of hard-coding chip names.
- Describe an unknown DeviceType as unrecognized.
- Link to v4: https://patch.msgid.link/20260928-master-v4-1-052c73ec1767@gmail.com

Changes in v4:
- Drop the generic compatible and binding update.
- Keep the established OnePlus DTS unchanged.
- Detect bq27541 from DeviceType in the bq27411 probe path.
- Send as a new thread.

---
Rinat Muhamedgaliev (1):
      power: supply: bq27xxx: detect bq27541 behind bq27411 compatible

 drivers/power/supply/bq27xxx_battery_i2c.c | 39 ++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)
---
base-commit: 830b3c68c1fb1e9176028d02ef86f3cf76aa2476
change-id: 20260927-master-bd0afd9696ef

Best regards,
--  
Rinat Muhamedgaliev <rinat.muhamedgaliev@gmail.com>


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

end of thread, other threads:[~2026-10-18 10:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-18  0:51 [PATCH v5] bq27xxx: support interchangeable OnePlus 6/6T fuel gauges Rinat Muhamedgaliev
2026-10-18  0:51 ` [PATCH v5] power: supply: bq27xxx: detect bq27541 behind bq27411 compatible Rinat Muhamedgaliev
2026-10-18 10:43   ` David Heidelberg

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.