linux-pm.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 0/5] power: supply: Add adc-battery-helper lib and Intel Dollar Cove TI CC battery driver
@ 2025-07-21 12:25 Hans de Goede
  2025-07-21 12:26 ` [PATCH v3 1/5] power: supply: Add adc-battery-helper Hans de Goede
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Hans de Goede @ 2025-07-21 12:25 UTC (permalink / raw)
  To: Sebastian Reichel; +Cc: Hans de Goede, Linus Walleij, linux-pm

Hi All,

Here is a patch-series which primary goal is to add support for
using the coulomb-counter in the Intel Dollar Cove TI PMIC as
battery power-supply class device.

This PMIC used on some Intel Bay/Cherry Trail systems has some builtin
fuel-gauge functionality which just like the UG3105 fuel-gauge is not
a full featured autonomous fuel-gauge.

To prepare for adding support for this, this series factors out the UG3105
capacity estimating code, generalized so that it can be re-used in other
drivers.

This series has been tested on an Asus ME176C tablet with UG3105 fuel-gauge
and on an Acer A1 840 tablet which uses the Intel Dollar Cove TI coulomb-
counter as fuel-gauge.

Changes in v3:
- Drop hardcoded open-circuit-voltage to capacity mapping table, replacing
  it with using the "ocv-capacity-table-n" device-property and replace DIY
  code with power_supply_batinfo_ocv2cap()
- Rebase on latest upstream where ug3105_battery was already switched to
  "ocv-capacity-table-n" device-prop + power_supply_batinfo_ocv2cap()
- Switch fg druver to iio_read_channel_processed_scale() which moves
  the Vbat ADC calibration handling and scaling to the IIO ADC driver
- Drop (already fixed) "power: supply: adc-battery-helper: Fix reporting
  capacity > 100%"

Changes in v2:
- Drop the 2 already merged bug-fix patches
- Add missing MODULE_DESCRIPTION() to the new adc-battery-helper module

Regards,

Hans

*** BLURB HERE ***

Hans de Goede (5):
  power: supply: Add adc-battery-helper
  power: supply: ug3105_battery: Switch to adc-battery-helper
  power: supply: ug3105_battery: Put FG in standby on remove and
    shutdown
  power: supply: adc-battery-helper: Add support for optional
    charge_finished GPIO
  power: supply: Add new Intel Dollar Cove TI battery driver

 drivers/power/supply/Kconfig               |  16 +
 drivers/power/supply/Makefile              |   2 +
 drivers/power/supply/adc-battery-helper.c  | 327 +++++++++++++++++
 drivers/power/supply/adc-battery-helper.h  |  62 ++++
 drivers/power/supply/intel_dc_ti_battery.c | 394 +++++++++++++++++++++
 drivers/power/supply/ug3105_battery.c      | 346 ++++--------------
 6 files changed, 867 insertions(+), 280 deletions(-)
 create mode 100644 drivers/power/supply/adc-battery-helper.c
 create mode 100644 drivers/power/supply/adc-battery-helper.h
 create mode 100644 drivers/power/supply/intel_dc_ti_battery.c

-- 
2.49.0


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

end of thread, other threads:[~2025-07-26 22:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-21 12:25 [PATCH v3 0/5] power: supply: Add adc-battery-helper lib and Intel Dollar Cove TI CC battery driver Hans de Goede
2025-07-21 12:26 ` [PATCH v3 1/5] power: supply: Add adc-battery-helper Hans de Goede
2025-07-26 22:40   ` Linus Walleij
2025-07-21 12:26 ` [PATCH v3 2/5] power: supply: ug3105_battery: Switch to adc-battery-helper Hans de Goede
2025-07-26 22:41   ` Linus Walleij
2025-07-21 12:26 ` [PATCH v3 3/5] power: supply: ug3105_battery: Put FG in standby on remove and shutdown Hans de Goede
2025-07-26 22:42   ` Linus Walleij
2025-07-21 12:26 ` [PATCH v3 4/5] power: supply: adc-battery-helper: Add support for optional charge_finished GPIO Hans de Goede
2025-07-21 12:26 ` [PATCH v3 5/5] power: supply: Add new Intel Dollar Cove TI battery driver Hans de Goede
2025-07-26 22:45   ` Linus Walleij

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).