From: Hans de Goede <hansg@kernel.org>
To: Sebastian Reichel <sre@kernel.org>,
Linus Walleij <linus.walleij@linaro.org>
Cc: Hans de Goede <hansg@kernel.org>, linux-pm@vger.kernel.org
Subject: [PATCH v4 0/5] power: supply: Add adc-battery-helper lib and Intel Dollar Cove TI CC battery driver
Date: Sun, 31 Aug 2025 14:29:36 +0200 [thread overview]
Message-ID: <20250831122942.47875-1-hansg@kernel.org> (raw)
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
next reply other threads:[~2025-08-31 12:29 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-08-31 12:29 Hans de Goede [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20250831122942.47875-1-hansg@kernel.org \
--to=hansg@kernel.org \
--cc=linus.walleij@linaro.org \
--cc=linux-pm@vger.kernel.org \
--cc=sre@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.