public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* [RFC PATCH 0/2] Add driver for TI BQ25630 charger
@ 2026-02-27 15:35 Waqar Hameed
  2026-02-27 15:35 ` [RFC PATCH 2/2] power: supply: " Waqar Hameed
  2026-02-27 15:35 ` [RFC PATCH 1/2] dt-bindings: power: supply: Add " Waqar Hameed
  0 siblings, 2 replies; 7+ messages in thread
From: Waqar Hameed @ 2026-02-27 15:35 UTC (permalink / raw)
  To: Sebastian Reichel, Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: kernel, linux-kernel, linux-pm, devicetree

This patch series contains a fully working driver for the basic
functionality for the new TI BQ25630 charger (see datasheet [1]).
However, some functionality has no straightforward implementation. The
following features have therefore been left out and hopefully we can
have some design discussions to reach a clear resolution for the next
patch version (hence the RFC tag):

  1. The USB OTG functionality (i.e. power *out* from the device) would
     probably need a minor refactorization to use the MFD sub-system to
     also register a regulator driver. Looking at the bq257xx driver,
     this should be the preferred design?
     
  2. Other drivers add a custom `sysfs` attributes for BATFET control.
     See for example rt9471 and bq24190. Is this the preferred approach?
     Should we add a new power `sysfs` class ABI for this? (There is a
     TODO left in the code for this.)
     
     I reckon it is quite common to have BATFET control for chargers,
     i.e. being able to set them in "ship mode", "stand-by mode",
     "shutdown mode" or "idle mode" (example values taken from the
     `BATFET_CTRL` register field from datasheet [1])?
     
  3. This device has liquid detection and corrosion mitigation. I
     couldn't find any existing device driver with this kind of
     functionality. The datasheet [1] even mentions "patent pending",
     although it refers to the USB type-C Specification 2.3... :)
     
     When liquid is detected in the charging port, an interrupt is
     fired. Likewise, an interrupt can be fired when the port is dry
     enough (according to some configured threshold value). My initial
     thought was that maybe we can add "liquid detected" to the `health`
     `sysfs` ABI? However, the question still remains though how one
     should enable/disable and set threshold values for this (new power
     class `sysfs` ABI or a custom one only for this driver)?

[1] https://www.ti.com/lit/gpn/bq25630

Waqar Hameed (2):
  dt-bindings: power: supply: Add TI BQ25630 charger
  power: supply: Add driver for TI BQ25630 charger

 .../bindings/power/supply/bq25630.yaml        |   68 ++
 drivers/power/supply/Kconfig                  |    7 +
 drivers/power/supply/Makefile                 |    1 +
 drivers/power/supply/bq25630_charger.c        | 1074 +++++++++++++++++
 4 files changed, 1150 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/power/supply/bq25630.yaml
 create mode 100644 drivers/power/supply/bq25630_charger.c


base-commit: f4d0ec0aa20d49f09dc01d82894ce80d72de0560
-- 
2.39.5


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

end of thread, other threads:[~2026-03-04 16:16 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-27 15:35 [RFC PATCH 0/2] Add driver for TI BQ25630 charger Waqar Hameed
2026-02-27 15:35 ` [RFC PATCH 2/2] power: supply: " Waqar Hameed
2026-02-27 15:35 ` [RFC PATCH 1/2] dt-bindings: power: supply: Add " Waqar Hameed
2026-02-27 17:31   ` Conor Dooley
2026-03-02 13:44     ` Waqar Hameed
2026-03-02 17:47       ` Conor Dooley
2026-03-04 16:16         ` Waqar Hameed

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