public inbox for linux-pm@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/5] power: supply: Add adc-battery-helper lib and Intel Dollar Cove TI CC battery driver
@ 2025-08-31 12:29 Hans de Goede
  2025-08-31 12:29 ` [PATCH v4 1/5] power: supply: Add adc-battery-helper Hans de Goede
                   ` (5 more replies)
  0 siblings, 6 replies; 9+ messages in thread
From: Hans de Goede @ 2025-08-31 12:29 UTC (permalink / raw)
  To: Sebastian Reichel, Linus Walleij; +Cc: Hans de Goede, 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 v4:
- s/MOV_AVG_WINDOW/MOV_AVG_WINDOW_SIZE/
- s/CELCIUS/CELSIUS/
- s/procent/percent/
- Add Linus' Reviewed-by to all patches

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 driver 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


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.51.0


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

end of thread, other threads:[~2025-09-10 14:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-08-31 12:29 [PATCH v4 0/5] power: supply: Add adc-battery-helper lib and Intel Dollar Cove TI CC battery driver Hans de Goede
2025-08-31 12:29 ` [PATCH v4 1/5] power: supply: Add adc-battery-helper Hans de Goede
2025-08-31 12:29 ` [PATCH v4 2/5] power: supply: ug3105_battery: Switch to adc-battery-helper Hans de Goede
2025-08-31 12:29 ` [PATCH v4 3/5] power: supply: ug3105_battery: Put FG in standby on remove and shutdown Hans de Goede
2025-08-31 12:29 ` [PATCH v4 4/5] power: supply: adc-battery-helper: Add support for optional charge_finished GPIO Hans de Goede
2025-08-31 12:29 ` [PATCH v4 5/5] power: supply: Add new Intel Dollar Cove TI battery driver Hans de Goede
2025-09-05 23:59   ` Sebastian Reichel
2025-09-10 14:07     ` Hans de Goede
2025-09-05 23:59 ` [PATCH v4 0/5] power: supply: Add adc-battery-helper lib and Intel Dollar Cove TI CC " Sebastian Reichel

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