power: supply: Add adc-battery-helper lib and Intel Dollar Cove TI CC battery driver
Status from this message: Applied, thanks!
Get series with b4
b4 am [email protected]Versions newest first · linked by author and title
- v4 Latest5 patches 3 repliesApplied
- v35 patches 4 repliesSuperseded
Changes in v4 from the cover letter
- s/MOV_AVG_WINDOW/MOV_AVG_WINDOW_SIZE/
- s/CELCIUS/CELSIUS/
- s/procent/percent/
- Add Linus' Reviewed-by to all patches
Patches in v4 Applied
| # | Subject and files | Size | Replies | Applied |
|---|---|---|---|---|
| 1/5 | power: supply: Add adc-battery-helperdrivers/ drivers/ drivers/ +1 more | +378 | 0 replies | |
| 2/5 | power: supply: ug3105_battery: Switch to adc-battery-helperdrivers/ drivers/ | +65 | 0 replies | |
| 3/5 | power: supply: ug3105_battery: Put FG in standby on remove and shutdowndrivers/ | +2 | 0 replies | |
| 4/5 | power: supply: adc-battery-helper: Add support for optional charge_finished GPIOdrivers/ drivers/ drivers/ | +20 | 0 replies | |
| 5/5 | power: supply: Add new Intel Dollar Cove TI battery driverdrivers/ drivers/ drivers/ | +407 | 2 replies |
Reviews trailers per patch
All 5 patches have a Reviewed-by or Acked-by.
| Patch | Linus Walleij |
|---|---|
| 1/5 | R-b |
| 2/5 | R-b |
| 3/5 | R-b |
| 4/5 | R-b |
| 5/5 | R-b |
Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.
Cover letter [PATCH v4 0/5] power: supply: Add adc-battery-helper lib and Intel Dollar Cove TI CC battery driver
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
Signature · 1 line
2.51.0