|
|
Log in / Subscribe / Register

power: supply: Add adc-battery-helper lib and Intel Dollar Cove TI CC battery driver

From:  Hans de Goede <hdegoede-AT-redhat.com>
To:  Sebastian Reichel <sre-AT-kernel.org>
Subject:  [PATCH v2 0/6] power: supply: Add adc-battery-helper lib and Intel Dollar Cove TI CC battery driver
Date:  Tue, 07 Jan 2025 12:33:40 +0100
Message-ID:  <20250107113346.170612-1-hdegoede@redhat.com>
Cc:  Hans de Goede <hdegoede-AT-redhat.com>, linux-pm-AT-vger.kernel.org
Archive-link:  Article

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.

While working on this I also noticed several other small issues in the now
factored out adc-batter-helper code as well as in the ug3105 driver. These
issues are addressed in separate patches.

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 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 (6):
  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: Fix reporting capacity > 100%
  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  | 381 ++++++++++++++++++
 drivers/power/supply/adc-battery-helper.h  |  61 +++
 drivers/power/supply/intel_dc_ti_battery.c | 429 +++++++++++++++++++++
 drivers/power/supply/ug3105_battery.c      | 393 +++----------------
 6 files changed, 953 insertions(+), 329 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.47.1




Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds