Devicetree
 help / color / mirror / Atom feed
* [PATCH v2 0/2] Add TI BQ27Z558 fuel gauge support
@ 2026-11-26 20:19 Prachoday Sutar
  2026-11-26 20:19 ` [PATCH v2 1/2] dt-bindings: power: supply: bq27xxx: Add BQ27Z558 Prachoday Sutar
  2026-11-26 20:19 ` [PATCH v2 2/2] power: supply: bq27xxx: Add BQ27Z558 I2C device ID Prachoday Sutar
  0 siblings, 2 replies; 3+ messages in thread
From: Prachoday Sutar @ 2026-11-26 20:19 UTC (permalink / raw)
  To: sre, robh, krzk+dt, conor+dt, pali, afd
  Cc: linux-pm, devicetree, Prachoday Sutar

The TI BQ27Z558 is a single-cell fuel gauge documented in the same
Technical Reference Manual as the BQ27Z561-R2 (SLUUC54) and is register
compatible with the BQ27Z561.

Patch 1 adds the compatible to the binding with "ti,bq27z561" as the
fallback. Patch 2 adds a matching I2C device ID so the driver probes
correctly when the client is named after the first compatible.

Tested on a Kneron KL630-based board with a BQ27Z558, using a vendor
Linux 4.9 kernel with the equivalent bq27xxx changes and the fallback
compatible in DT. Voltage, current, capacity, status and temperature
read correctly through /sys/class/power_supply.

Changes in v2:
- Add patch 2. Binding via the fallback compatible alone left
  i2c_client_get_device_id() returning NULL in probe, causing a NULL
  pointer dereference (reported by the Sashiko AI review).
- Patch 1: drop the claim from the commit message that no driver
  changes are needed.

Link to v1: https://lore.kernel.org/r/20261126191906.25708-1-prachodaysutar7@gmail.com

Prachoday Sutar (2):
  dt-bindings: power: supply: bq27xxx: Add BQ27Z558
  power: supply: bq27xxx: Add BQ27Z558 I2C device ID

 .../bindings/power/supply/bq27xxx.yaml        | 72 ++++++++++---------
 drivers/power/supply/bq27xxx_battery_i2c.c    |  1 +
 2 files changed, 39 insertions(+), 34 deletions(-)

-- 
2.53.0


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

end of thread, other threads:[~2026-11-26 20:22 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-26 20:19 [PATCH v2 0/2] Add TI BQ27Z558 fuel gauge support Prachoday Sutar
2026-11-26 20:19 ` [PATCH v2 1/2] dt-bindings: power: supply: bq27xxx: Add BQ27Z558 Prachoday Sutar
2026-11-26 20:19 ` [PATCH v2 2/2] power: supply: bq27xxx: Add BQ27Z558 I2C device ID Prachoday Sutar

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